Fast equalization method, chip, and communications system

ABSTRACT

A fast equalization method is provided, which includes: storing a receive parameter and a transmit parameter, of each of a primary chip and a secondary chip, that meet a link stability requirement and that are obtained when link equalization is previously performed; and when determining that link equalization needs to be performed, configuring, as first fast equalization timeout duration, a larger value in initial fast equalization timeout duration of the primary chip and initial fast equalization timeout duration of the secondary chip, and invoking the foregoing receive and transmit parameters, so that the primary chip and the secondary chip perform a current time of link equalization based on the first fast equalization timeout duration and the foregoing transmit and receive parameters.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/100,033, filed on Nov. 20, 2020, which is a continuation ofInternational Application No. PCT/CN2019/081635, filed on Apr. 6, 2019,which claims priority to Chinese Patent Application No. 201810942481.6,filed on Aug. 17, 2018 and Chinese Patent Application NO.201810629423.8, filed on Jun. 19, 2018. All of the afore-mentionedpatent applications are hereby incorporated by reference in theirentireties.

TECHNICAL FIELD

This application relates to the field of chip technologies, and inparticular, to a fast equalization method, a fast equalizationapparatus, a chip, and a communications system.

BACKGROUND

As specified in a peripheral component interconnect express (PCIe) busstandard or a cache coherent interconnect for accelerators (CCIX) busstandard, when a link cannot run stably for some reasons (such as chipaging or a temperature change), system software (SW) needs to repair thelink. A link repair process includes link equalization (or simplyreferred to as “equalization”). If a link equalization process triggeredby the system software consumes excessively long duration, an error maybe caused, for example, system working or running times out. Therefore,an appropriate method is required to resolve the problem that the linkequalization process consumes excessively long duration.

SUMMARY

This application provides a fast equalization method, to reduce durationrequired in a link equalization process. Further, this applicationfurther provides an apparatus and a communications system for performingthe method, and a chip used in performing the method.

According to a first aspect, a fast equalization method is provided,where the method includes the following steps:

storing first equalization parameters that meet a link stabilityrequirement and that are obtained when an (N−a)^(th) time of linkequalization is performed, where the first equalization parametersinclude a receive parameter and a transmit parameter of a primary chipand a receive parameter and a transmit parameter of a secondary chip,N≥2, 1≤a≤N, and both a and N are integers;

when determining that an N^(th) time of link equalization needs to beperformed, reading initial fast equalization timeout duration of theprimary chip (also referred to as first initial fast equalizationtimeout duration) and initial fast equalization timeout duration of thesecondary chip (also referred to as second initial fast equalizationtimeout duration), where the initial fast equalization timeout durationof the primary chip is less than or equal to equalization timeoutduration that is of the primary chip in a fourth phase of equalizationand that exists when the (N−a)^(th) time of link equalization isperformed, the initial fast equalization timeout duration of thesecondary chip is less than or equal to equalization timeout durationthat is of the secondary chip in a third phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed, boththe initial fast equalization timeout duration of the primary chip andthe initial fast equalization timeout duration of the secondary chip aredevice advertise values, and both the equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed andthe equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed are hardware initialize values; and

configuring first fast equalization timeout duration based on theinitial fast equalization timeout duration of the primary chip and theinitial fast equalization timeout duration of the secondary chip, andinvoking the first equalization parameters, so that the primary chip andthe secondary chip perform the N^(th) time of link equalization based onthe first fast equalization timeout duration and the first equalizationparameters, where the first fast equalization timeout duration is alarger value in the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, and the first fast equalization timeout duration isequalization timeout duration that is of the primary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe primary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

In an embodiment, when the (N−a)^(th) time of link equalization isperformed and a link is stable, equalization parameters (namely, thefirst equalization parameters) that meet the link stability requirementare stored. For example, in the method, system software (or a systemmanagement chip) may store the first equalization parameters into theprimary chip (for example, firmware or a register of the primary chip).When determining that the N^(th) time of link equalization needs to beperformed, the system software first reads the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip, determines the larger value inthe initial fast equalization timeout duration of the primary chip andthe initial fast equalization timeout duration of the secondary chip,and then configures the larger value as fast equalization timeoutduration (namely, the first fast equalization timeout duration), andinvokes the first equalization parameters. In this way, the primary chipand the secondary chip each may use the first equalization parameters asinitial parameters, and perform link equalization based on the firstfast equalization timeout duration. Because the first equalizationparameters are parameters that are selected in the (N−a)^(th) time ofequalization and that relatively match the link, in a second phase(phase 1) of an equalization process, the primary chip and/or thesecondary chip can quickly implement bit/symbol locking, to meet arequirement that a bit error rate of data is less than 10E-4. In a thirdphase (phase 2) of the equalization process, because the transmitparameter of the primary chip and the receive parameter of the secondarychip in the first equalization parameters relatively match the link, andan initial bit error rate of the link is relatively low, the secondarychip needs to slightly adjust (for example, one to two times) only thereceive parameter of the secondary chip and the transmit parameter ofthe primary chip, to meet the link stability requirement (for example,the bit error rate is less than 10E-12). In this way, it can be ensuredthat the primary chip and the secondary chip complete equalizationwithin the first fast equalization timeout duration, thereby reducingequalization timeout duration. Similarly, in a fourth phase (phase 3) ofthe equalization process, because the receive parameter of the primarychip and the transmit parameter of the secondary chip in the firstequalization parameters relatively match the link, and the initial biterror rate of the link is relatively low, the primary chip needs toslightly adjust (for example, one to two times) only the receiveparameter of the primary chip and the transmit parameter of thesecondary chip, to meet the link stability requirement (for example, thebit error rate is less than 10E-12). In this way, it can be ensured thatthe primary chip and the secondary chip complete equalization within thefirst fast equalization timeout duration, thereby reducing durationrequired in the equalization process. After rate change is completed andthe link can run stably, the primary chip and the secondary chip performrate change to reach a higher-level rate, repeatedly use the first fastequalization timeout duration, and invoke the first equalizationparameters as initial equalization parameters, to perform linkequalization, until parameters that meet the link stability requirementat each rate are found again. After link equalization at all ratessupported by the chip is completed, before the N^(th) time of linkequalization is performed for the link, the link runs at a highest rateor service data is transmitted at a highest rate that can meet the linkstability requirement.

Therefore, in the fast equalization method in an embodiment of thisapplication, when a current time of link equalization is performed,previously stored equalization parameters that meet the link stabilityrequirement and equalization timeout duration (namely, the first fastequalization timeout duration) shorter than that in the prior art areused, so that duration of an equalization phase can be shortened. Inaddition, because the equalization timeout duration is relatively short,in the fast equalization method in this embodiment of this application,a probability that an entire link repair (for example, hot reset or linkretrain) process is completed within is can be improved while it isensured that a high-speed high-loss link can run stably, to avoid thefollowing problem as much as possible: Waiting times out in the linkrepair process initiated by the system software, and consequently thesystem software considers that the link is unavailable.

It should be noted that the primary chip in this application is a chipthat includes a downstream port (DSP). Sometimes, the primary chip isalso referred to as a downstream port. The secondary chip in thisapplication is a chip that includes an upstream port (USP). Sometimes,the secondary chip is also referred to as an upstream port.

It should be further noted that the first equalization parametersinclude receive and transmit parameters, of each of the primary chip andthe secondary chip, that meet the link stability requirement at variouslink rates.

In an embodiment, the primary chip and the secondary chip may beconnected to each other by using a PCIe bus or a CCIX bus. It can belearned that the fast equalization method provided in this embodiment isapplied to a processor system in which the PCIe bus or the CCIX bus isused.

Further, in the processor system to which the PCIe bus is applied, theprimary chip is a root complex (RC) or a switch chip, and the secondarychip is an endpoint (EP) independent of the primary chip. It should belearned that, the switch chip may be a primary chip in some cases, ormay be a secondary chip in other cases.

In the fast equalization method in an embodiment of this application,because the previously stored equalization parameters that meet the linkstability requirement may be used, relatively short equalization timeoutduration may be set. When waiting duration (namely, Is) that is of thesystem software during link repair and that is specified in a currentprotocol does not need to be changed, the following problem can beavoided as much as possible: Waiting times out in the link repairprocess initiated by the system software, and consequently the systemsoftware considers that the link is unavailable. Therefore, in themethod in this embodiment of this application, compatibility of aPCIe/CCIX protocol can be well implemented, and a modification operationon various versions of the system software due to a compatibilityproblem can also be avoided.

In an embodiment, performing the N^(th) time of link equalizationincludes hot reset and link retrain that are triggered by an operatingsystem.

In the foregoing descriptions, a may be 1. Therefore, in the method inan embodiment of this application, equalization parameters that enablethe link to run stably and that are obtained when link equalization isperformed most recently may be used in a link equalization processtriggered by hot reset or link retrain. Because the equalizationparameters that enable the link to run stably and that are obtained whenlink equalization is performed most recently relatively match the link,and the initial bit error rate of the link is relatively low, it can beensured that the primary chip and the secondary chip completeequalization within the first fast equalization timeout duration,thereby reducing the duration required in the equalization process.

In an embodiment, the initial fast equalization timeout duration of theprimary chip is determined based on a physical layer (PHY) capabilitysupported by the primary chip, or the initial fast equalization timeoutduration of the secondary chip is determined based on a PHY capabilitysupported by the secondary chip.

In an embodiment, before the configuring first fast equalization timeoutduration based on the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, the method may further include:

determining whether the primary chip supports fast equalization, anddetermining whether the secondary chip supports the fast equalization;and correspondingly, the configuring first fast equalization timeoutduration specifically includes: configuring the first fast equalizationtimeout duration when both the primary chip and the secondary chipsupport the fast equalization.

In an embodiment, whether to configure the first fast equalizationtimeout duration is determined based on whether the primary chip and thesecondary chip support fast equalization, so that the following problemcan be avoided: System disorder may be caused by configuring the firstfast equalization timeout duration when the primary chip or thesecondary chip does not support fast equalization.

In an embodiment, the determining whether the primary chip supports fastequalization includes: when the initial fast equalization timeoutduration of the primary chip is not 0, determining that the primary chipsupports the fast equalization.

In an embodiment, a register for identifying whether the primary chipsupports fast equalization does not need to be specially disposed, andwhether the primary chip supports fast equalization can be determined bydetermining whether the initial fast equalization timeout duration is 0.Therefore, a design can be simplified.

In an embodiment, the determining whether the secondary chip supportsthe fast equalization specifically includes: when the initial fastequalization timeout duration of the secondary chip is not 0,determining that the secondary chip supports the fast equalization.

In an embodiment, a register for identifying whether the secondary chipsupports fast equalization does not need to be specially disposed, andwhether the secondary chip supports fast equalization can be determinedby determining whether the initial fast equalization timeout duration is0. Therefore, a design can be simplified.

In an embodiment, the method may further include: storing secondequalization parameters that meet the link stability requirement andthat are obtained when the N^(th) time of link equalization isperformed, where the second equalization parameters include a receiveparameter and a transmit parameter of the primary chip and a receiveparameter and a transmit parameter of the secondary chip.

In an embodiment, the second equalization parameters that meet the linkstability requirement and that are obtained when the N^(th) time of linkequalization is performed are stored, so that the second equalizationparameters can be used in a subsequent equalization process.

In an embodiment, the method may further include: clearing the firstfast equalization timeout duration.

In an embodiment, the first fast equalization timeout duration iscleared, so that fast equalization can be disabled.

In an embodiment, the method may further include: when determining thatan (N+b)^(th) time of link equalization needs to be performed,configuring second fast equalization timeout duration, and invoking thesecond equalization parameters, so that the primary chip and thesecondary chip perform the (N+b)^(th) time of link equalization based onthe second fast equalization timeout duration and the secondequalization parameters, where the second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

In an embodiment, when it is determined that the (N+b)^(th) time of linkequalization needs to be performed, the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip may be read first, the largervalue in the initial fast equalization timeout duration of the primarychip and the initial fast equalization timeout duration of the secondarychip is determined, and then the larger value is configured as fastequalization timeout duration (namely, the second fast equalizationtimeout duration), and the previously stored second equalizationparameters are invoked. In this way, the primary chip and the secondarychip each may use the second equalization parameters as initialparameters, and perform link equalization based on the second fastequalization timeout duration. Because the second equalizationparameters relatively match the link, and the initial bit error rate ofthe link is relatively low, it can be ensured that the primary chip andthe secondary chip complete equalization within the second fastequalization timeout duration, thereby reducing duration required in anequalization process.

Therefore, in the fast equalization method in an embodiment of thisapplication, when a current time of link equalization is performed,previously stored equalization parameters that meet the link stabilityrequirement and equalization timeout duration shorter than that in theprior art can be used, so that duration of an equalization phase can beshortened.

According to a second aspect, a fast equalization apparatus is provided,where the apparatus is adapted to perform the method according to anyone of the first aspect or the implementations of the first aspect, andthe apparatus includes a manager and a transceiver.

The manager is adapted to store first equalization parameters that meeta link stability requirement and that are obtained when an (N−a)^(th)time of link equalization is performed, where the first equalizationparameters include a receive parameter and a transmit parameter of aprimary chip and a receive parameter and a transmit parameter of asecondary chip, N≥2, 1≤a≤N, and both a and N are integers.

The transceiver is adapted to: when the manager determines that anN^(th) time of link equalization needs to be performed, read initialfast equalization timeout duration of the primary chip and initial fastequalization timeout duration of the secondary chip, where the initialfast equalization timeout duration of the primary chip is less than orequal to equalization timeout duration that is of the primary chip in afourth phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed, the initial fast equalization timeoutduration of the secondary chip is less than or equal to equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, both the initial fast equalization timeoutduration of the primary chip and the initial fast equalization timeoutduration of the secondary chip are device advertise values, and both theequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed and the equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N−a)^(th) time of link equalization is performed are hardwareinitialize values.

The manager is further adapted to: configure first fast equalizationtimeout duration based on the initial fast equalization timeout durationof the primary chip and the initial fast equalization timeout durationof the secondary chip, and invoke the first equalization parameters, sothat the primary chip and the secondary chip perform the N^(th) time oflink equalization based on the first fast equalization timeout durationand the first equalization parameters, where the first fast equalizationtimeout duration is a larger value in the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip, and the first fast equalizationtimeout duration is equalization timeout duration that is of the primarychip in the third phase of equalization and that exists when the N^(th)time of link equalization is performed and equalization timeout durationthat is of the primary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

The apparatus provided in an embodiment can be used to implement thefast equalization method according to any one of the first aspect or thepossible implementations of the first aspect. According to the apparatusprovided in an embodiment, previously stored equalization parametersthat meet the link stability requirement and equalization timeoutduration (namely, the first fast equalization timeout duration) shorterthan that in the prior art can be used, so that duration of anequalization phase can be shortened. In addition, because theequalization timeout duration is relatively short, according to theapparatus in this embodiment of this application, a probability that anentire link repair (for example, hot reset or link retrain) process iscompleted within Is can be improved while it is ensured that ahigh-speed high-loss link can run stably, to avoid the following problemas much as possible: Waiting times out in the link repair processinitiated by system software, and consequently the system softwareconsiders that the link is unavailable.

In an embodiment, the primary chip and the secondary chip may beconnected to each other by using a PCIe bus or a CCIX bus.

In an embodiment, performing the N^(th) time of link equalizationincludes hot reset and link retrain that are triggered by an operatingsystem.

In an embodiment, the initial fast equalization timeout duration of theprimary chip is determined based on a physical layer PHY capabilitysupported by the primary chip, or the initial fast equalization timeoutduration of the secondary chip is determined based on a PHY capabilitysupported by the secondary chip.

In an embodiment, the manager is further adapted to: determine whetherthe primary chip supports fast equalization, and determine whether thesecondary chip supports the fast equalization; and correspondingly, thatthe manager is further adapted to configure first fast equalizationtimeout duration specifically includes: configuring the first fastequalization timeout duration when both the primary chip and thesecondary chip support the fast equalization.

In an embodiment, that the manager is further adapted to determinewhether the primary chip supports fast equalization specificallyincludes: when the initial fast equalization timeout duration of theprimary chip is not 0, determining that the primary chip supports thefast equalization.

In an embodiment, that the manager is further adapted to determinewhether the secondary chip supports the fast equalization specificallyincludes:

when the initial fast equalization timeout duration of the secondarychip is not 0, determining that the secondary chip supports the fastequalization.

In an embodiment, the manager is further adapted to store secondequalization parameters that meet the link stability requirement andthat are obtained when the N^(th) time of link equalization isperformed, where the second equalization parameters include a receiveparameter and a transmit parameter of the primary chip and a receiveparameter and a transmit parameter of the secondary chip.

In an embodiment, the manager is further adapted to clear the first fastequalization timeout duration.

In an embodiment, the manager is further adapted to: when determiningthat an (N+b)^(th) time of link equalization needs to be performed,configure second fast equalization timeout duration, and invoke thesecond equalization parameters, so that the primary chip and thesecondary chip perform the (N+b)^(th) time of link equalization based onthe second fast equalization timeout duration and the secondequalization parameters, where the second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

It should be understood that, for beneficial effects of the secondaspect, refer to beneficial effects corresponding to relatedimplementations of the first aspect. Details are not described hereinagain.

According to a third aspect, a fast equalization apparatus is provided,where the apparatus is also adapted to perform the fast equalizationmethod according to any one of the first aspect or the implementationsof the first aspect, and the apparatus includes a storage unit, a readunit, a determining unit, and a configuration and invoking unit.

The storage unit is adapted to store first equalization parameters thatmeet a link stability requirement and that are obtained when an(N−a)^(th) time of link equalization is performed, where the firstequalization parameters include a receive parameter and a transmitparameter of a primary chip and a receive parameter and a transmitparameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers.

The read unit is adapted to: when the determining unit determines thatan N^(th) time of link equalization needs to be performed, read initialfast equalization timeout duration of the primary chip and initial fastequalization timeout duration of the secondary chip, where the initialfast equalization timeout duration of the primary chip is less than orequal to equalization timeout duration that is of the primary chip in afourth phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed, the initial fast equalization timeoutduration of the secondary chip is less than or equal to equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, both the initial fast equalization timeoutduration of the primary chip and the initial fast equalization timeoutduration of the secondary chip are device advertise values, and both theequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed and the equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N−a)^(th) time of link equalization is performed are hardwareinitialize values.

The configuration and invoking unit is adapted to: configure first fastequalization timeout duration based on the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip, and invoke the firstequalization parameters, so that the primary chip and the secondary chipperform the N^(th) time of link equalization, where the first fastequalization timeout duration is a larger value in the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip, and the first fastequalization timeout duration is equalization timeout duration that isof the primary chip in the third phase of equalization and that existswhen the N^(th) time of link equalization is performed and equalizationtimeout duration that is of the primary chip in the fourth phase ofequalization and that exists when the N^(th) time of link equalizationis performed, and is equalization timeout duration that is of thesecondary chip in the third phase of equalization and that exists whenthe N^(th) time of link equalization is performed and equalizationtimeout duration that is of the secondary chip in the fourth phase ofequalization and that exists when the N^(th) time of link equalizationis performed.

The apparatus provided in this embodiment can be used to implement thefast equalization method according to any one of the first aspect or thepossible implementations of the first aspect. According to the apparatusprovided in this embodiment, previously stored equalization parametersthat meet the link stability requirement and equalization timeoutduration (namely, the first fast equalization timeout duration) shorterthan that in the prior art can be used, so that duration of anequalization phase can be shortened. In addition, because theequalization timeout duration is relatively short, according to theapparatus in this embodiment of this application, a probability that anentire link repair (for example, hot reset or link retrain) process iscompleted within Is can be improved while it is ensured that ahigh-speed high-loss link can run stably, to avoid the following problemas much as possible: Waiting times out in the link repair processinitiated by system software, and consequently the system softwareconsiders that the link is unavailable.

In an embodiment, the primary chip and the secondary chip may beconnected to each other by using a PCIe bus or a CCIX bus.

In an embodiment, the case in which the N^(th) time of link equalizationneeds to be performed includes hot reset and link retrain that aretriggered by an operating system.

In an embodiment, the initial fast equalization timeout duration of theprimary chip is determined based on a physical layer (PHY) capabilitysupported by the primary chip, or the initial fast equalization timeoutduration of the secondary chip is determined based on a PHY capabilitysupported by the secondary chip.

In an embodiment, the determining unit is further adapted to: determinewhether the primary chip supports fast equalization, and determinewhether the secondary chip supports the fast equalization; andcorrespondingly, that the configuration and invoking unit is adapted toconfigure first fast equalization timeout duration based on the initialfast equalization timeout duration of the primary chip and the initialfast equalization timeout duration of the secondary chip specificallyincludes: configuring the first fast equalization timeout duration whenboth the primary chip and the secondary chip support the fastequalization.

In an embodiment, that the determining unit is further adapted todetermine whether the primary chip supports fast equalizationspecifically includes: when the initial fast equalization timeoutduration of the primary chip is not 0, determining that the primary chipsupports the fast equalization.

In an embodiment, that the determining unit is further adapted todetermine whether the secondary chip supports the fast equalizationspecifically includes: when the initial fast equalization timeoutduration of the secondary chip is not 0, determining that the secondarychip supports the fast equalization.

In an embodiment, the storage unit is further adapted to store secondequalization parameters that meet the link stability requirement andthat are obtained when the N^(th) time of link equalization isperformed, where the second equalization parameters include a receiveparameter and a transmit parameter of the primary chip and a receiveparameter and a transmit parameter of the secondary chip.

In an embodiment, the configuration and invoking unit is further adaptedto clear the first fast equalization timeout duration.

In an embodiment, the configuration and invoking unit is further adaptedto: when the determining unit determines that an (N+b)^(th) time of linkequalization needs to be performed, configure second fast equalizationtimeout duration, and invoke the second equalization parameters, so thatthe primary chip and the secondary chip perform the (N+b)^(th) time oflink equalization based on the second fast equalization timeout durationand the second equalization parameters, where the second fastequalization timeout duration is equalization timeout duration that isof the primary chip in the third phase of equalization and that existswhen the (N+b)^(th) time of link equalization is performed andequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N+b)^(th) time of linkequalization is performed, and is equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N+b)^(th) time of link equalization is performed andequalization timeout duration that is of the secondary chip in thefourth phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed, the second fast equalization timeoutduration is the same as the first fast equalization timeout duration,b≥1, and b is an integer.

It should be understood that, for beneficial effects of the thirdaspect, refer to beneficial effects corresponding to relatedimplementations of the first aspect. Details are not described hereinagain.

According to a fourth aspect, a fast equalization apparatus is provided,where the apparatus is also adapted to perform the fast equalizationmethod according to any one of the first aspect or the implementationsof the first aspect, the apparatus includes a central processing unit(CPU) and a memory, and the CPU is adapted to execute code stored in thememory, to implement a function of the apparatus in this embodiment.

The memory is adapted to store first equalization parameters that meet alink stability requirement and that are obtained when an (N−a)^(th) timeof link equalization is performed, where the first equalizationparameters include a receive parameter and a transmit parameter of aprimary chip and a receive parameter and a transmit parameter of asecondary chip, N≥2, 1≤a≤N, and both a and N are integers.

The CPU is adapted to: when determining that an N^(th) time of linkequalization needs to be performed, read initial fast equalizationtimeout duration of the primary chip and initial fast equalizationtimeout duration of the secondary chip, where the initial fastequalization timeout duration of the primary chip is less than or equalto equalization timeout duration that is of the primary chip in a fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the initial fast equalization timeoutduration of the secondary chip is less than or equal to equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, both the initial fast equalization timeoutduration of the primary chip and the initial fast equalization timeoutduration of the secondary chip are device advertise values, and both theequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed and the equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N−a)^(th) time of link equalization is performed are hardwareinitialize values.

The CPU is adapted to: configure first fast equalization timeoutduration based on the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, and invoke the first equalization parameters, so thatthe primary chip and the secondary chip perform the N^(th) time of linkequalization, where the first fast equalization timeout duration is alarger value in the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, and the first fast equalization timeout duration isequalization timeout duration that is of the primary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe primary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

The apparatus provided in this embodiment can be used to implement thefast equalization method according to any one of the first aspect or thepossible implementations of the first aspect. According to the apparatusprovided in this embodiment, previously stored equalization parametersthat meet the link stability requirement and equalization timeoutduration (namely, the first fast equalization timeout duration) shorterthan that in the prior art can be used, so that duration of anequalization phase can be shortened. In addition, because theequalization timeout duration is relatively short, according to theapparatus in this embodiment of this application, a probability that anentire link repair (for example, hot reset or link retrain) process iscompleted within is can be improved while it is ensured that ahigh-speed high-loss link can run stably, to avoid the following problemas much as possible: Waiting times out in the link repair processinitiated by system software, and consequently the system softwareconsiders that the link is unavailable.

According to a fifth aspect, a chip is provided, where the chip may bethe primary chip mentioned in any one of the first aspect or theimplementations of the first aspect, any one of the second aspect or theimplementations of the second aspect, or any one of the third aspect orthe implementations of the third aspect, and the chip includes atransceiver, a first register, a second register, a third register, anda manager.

The transceiver is adapted to send first equalization parameters or areceive parameter and a transmit parameter of the chip in the firstequalization parameters, where the first equalization parameters areparameters that meet a link stability requirement and that are obtainedwhen an (N-a)^(th) time of link equalization is performed, the firstequalization parameters include the receive parameter and the transmitparameter of the chip and a receive parameter and a transmit parameterof a peer chip, N≥2, 1≤a≤N, and both a and N are integers.

The first register is adapted to store initial fast equalization timeoutduration of the chip, where the initial fast equalization timeoutduration of the chip is less than or equal to equalization timeoutduration that is of the chip in a fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed, theinitial fast equalization timeout duration of the chip is a deviceadvertise value, and the equalization timeout duration that is of thechip in the fourth phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed is a hardwareinitialize value.

The transceiver is further adapted to: send the initial fastequalization timeout duration of the chip, and receive first fastequalization timeout duration and the first equalization parameters,where the first fast equalization timeout duration is a larger value inthe initial fast equalization timeout duration of the chip and initialfast equalization timeout duration of the peer chip, the initial fastequalization timeout duration of the peer chip is less than or equal toequalization timeout duration that is of the peer chip in a third phaseof equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the equalization timeout duration that is ofthe peer chip in the third phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed is a hardwareinitialize value, and the initial fast equalization timeout duration ofthe peer chip is a device advertise value.

The manager is adapted to: set the first equalization parameters in thesecond register, and set the first fast equalization timeout duration inthe third register.

The manager is further adapted to: when the transceiver receives firstlink repair indication information, perform an N^(th) time of linkequalization based on the first fast equalization timeout duration andthe first equalization parameters, where the first link repairindication information is used to trigger the N^(th) time of linkequalization, and the first fast equalization timeout duration isequalization timeout duration that is of the chip in the third phase ofequalization and that exists when the N^(th) time of link equalizationis performed and equalization timeout duration that is of the chip inthe fourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the peer chip in the third phase of equalization and thatexists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the peer chip in the fourthphase of equalization and that exists when the N^(th) time of linkequalization is performed.

In an embodiment, when the (N−a)^(th) time of link equalization isperformed, after a link runs stably, the chip sends, to system software(or a system management chip), parameters of the chip (or parameters ofthe chip and parameters of the peer chip) that meet the link stabilityrequirement. The system software may store the received parameters intothe chip or an external storage medium, or the system software storesthe received parameters of the chip into the chip. When determining thatthe N^(th) time of link equalization needs to be performed, the systemsoftware reads the initial fast equalization timeout duration of thechip from the first register of the chip, determines the larger value inthe initial fast equalization timeout duration of the chip and theinitial fast equalization timeout duration of the peer chip, and writesthe larger value (namely, the first fast equalization timeout duration)into the third register of the chip. In addition, the system softwarereads the foregoing stored parameters from the external storage mediumor the chip, and then writes the parameters into the second register.Then, the chip may perform the N^(th) time of link equalization based onthe foregoing parameters stored in the second register and the firstfast equalization timeout duration stored in the third register.

It should be understood that the external storage medium is a storagemedium at a location other than the chip, the peer chip, and the systemsoftware.

The chip in this embodiment can implement the method according to anyone of the first aspect or the possible implementations of the firstaspect, and therefore can shorten duration of an equalization phase.

It should be understood that the second register is a register thatstores initial parameters used for link equalization. Before the secondregister stores the first equalization parameters or the transmitparameter and the receive parameter of the chip in the firstequalization parameters, the second register stores a hardwareinitialize value.

In addition, it should be noted that the transceiver may not send thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters. In thiscase, the chip may store the first equalization parameters or thereceive parameter and the transmit parameter of the chip in the firstequalization parameters into a register or firmware of the chip.Further, if the chip has a CPU or a component or unit with a functionthat can be implemented by a CPU, the transceiver may not receive thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters, but firstreads the foregoing parameters stored in the register or the firmware ofthe chip, and then writes the foregoing parameters into a location thatis in the second register and that is used to store the initialparameters.

In an embodiment, the transceiver is further adapted to send secondequalization parameters that meet the link stability requirement andthat are obtained when the N^(th) time of link equalization isperformed, or a receive parameter and a transmit parameter of the chipin the second equalization parameters, where the second equalizationparameters include the receive parameter and the transmit parameter ofthe chip and a receive parameter and a transmit parameter of the peerchip.

It should be noted that the transceiver may not send the secondequalization parameters or the receive parameter and the transmitparameter of the chip in the second equalization parameters. In thiscase, the chip may store the second equalization parameters or thereceive parameter and the transmit parameter of the chip in the secondequalization parameters into the register or the firmware of the chip.

In an embodiment, the transceiver is further adapted to receive clearingindication information, where the clearing indication information isused to clear the first fast equalization timeout duration; and themanager is further adapted to clear the first fast equalization timeoutduration based on the clearing indication information.

In an embodiment, the transceiver is further adapted to receive secondfast equalization timeout duration and the second equalizationparameters, where the second fast equalization timeout duration is thesame as the first fast equalization timeout duration. The manager isfurther adapted to: set the second equalization parameters in the secondregister, and set the second fast equalization timeout duration in thethird register; and when the transceiver receives second link repairindication information, perform an (N+b)^(th) time of link equalizationbased on the second fast equalization timeout duration and the secondequalization parameters, where the second link repair indicationinformation is used to trigger the (N+b)^(th) time of link equalization,the second fast equalization timeout duration is equalization timeoutduration that is of the chip in the third phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed andequalization timeout duration that is of the chip in the fourth phase ofequalization and that exists when the (N+b)^(th) time of linkequalization is performed, and is equalization timeout duration that isof the peer chip in the third phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed and equalizationtimeout duration that is of the peer chip in the fourth phase ofequalization and that exists when the (N+b)^(th) time of linkequalization is performed, b≥1, and b is an integer.

It should be understood that, in the third register, a location that isused to store the second fast equalization timeout duration is the sameas a location that is used to store the first fast equalization timeoutduration. In the second register, a location that is used to store thefirst equalization parameters (or the receive parameter and the transmitparameter of the chip in the first equalization parameters) may be thesame as or different from a location that is used to store the secondequalization parameters (or the receive parameter and the transmitparameter of the chip in the second equalization parameters). When thetwo locations are different, either the first equalization parameters orthe second equalization parameters may be used as the initialparameters.

According to a sixth aspect, a chip is provided, where the chip may bethe secondary chip mentioned in any one of the first aspect or theimplementations of the first aspect, any one of the second aspect or theimplementations of the second aspect, or any one of the third aspect orthe implementations of the third aspect, and the chip includes atransceiver, a first register, a second register, a third register, anda manager.

The transceiver is adapted to send first equalization parameters or areceive parameter and a transmit parameter of the chip in the firstequalization parameters, where the first equalization parameters areparameters that meet a link stability requirement and that are obtainedwhen an (N-a)^(th) time of link equalization is performed, the firstequalization parameters include the receive parameter and the transmitparameter of the chip and a receive parameter and a transmit parameterof a peer chip, N≥2, 1≤a≤N, and both a and N are integers.

The first register is adapted to store initial fast equalization timeoutduration of the chip, where the initial fast equalization timeoutduration of the chip is less than or equal to equalization timeoutduration that is of the chip in a third phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed, theinitial fast equalization timeout duration of the chip is a deviceadvertise value, and the equalization timeout duration that is of thechip in the third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed is a hardwareinitialize value.

The transceiver is further adapted to: send the initial fastequalization timeout duration of the chip, and receive first fastequalization timeout duration and the receive parameter and the transmitparameter of the chip in the first equalization parameters, where thefirst fast equalization timeout duration is a larger value in theinitial fast equalization timeout duration of the chip and initial fastequalization timeout duration of the peer chip, the initial fastequalization timeout duration of the peer chip is less than or equal toequalization timeout duration that is of the peer chip in a fourth phaseof equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the equalization timeout duration that is ofthe peer chip in the fourth phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed is a hardwareinitialize value, and the initial fast equalization timeout duration ofthe peer chip is a device advertise value.

The manager is adapted to: set the receive parameter and the transmitparameter of the chip in the first equalization parameters in the secondregister, and set the first fast equalization timeout duration in thethird register.

The manager is further adapted to: when the transceiver receives firstlink repair indication information, perform an N^(th) time of linkequalization based on the first fast equalization timeout duration andthe receive parameter and the transmit parameter of the chip in thefirst equalization parameters, where the first link repair indicationinformation is used to trigger the N^(th) time of link equalization, andthe first fast equalization timeout duration is equalization timeoutduration that is of the chip in the third phase of equalization and thatexists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the chip in the fourth phase ofequalization and that exists when the N^(th) time of link equalizationis performed, and is equalization timeout duration that is of the peerchip in the third phase of equalization and that exists when the N^(th)time of link equalization is performed and equalization timeout durationthat is of the peer chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed.

In an embodiment, when the (N−a)^(th) time of link equalization isperformed, after a link runs stably, the chip sends, to system software(or a system management chip), parameters of the chip (or parameters ofthe chip and parameters of the peer chip) that meet the link stabilityrequirement. The system software may store the received parameters intothe chip, an external storage medium, or the peer chip, or the systemsoftware stores the received parameters of the chip into the chip. Whendetermining that the N^(th) time of link equalization needs to beperformed, the system software reads the initial fast equalizationtimeout duration of the chip from the first register of the chip,determines the larger value in the initial fast equalization timeoutduration of the chip and the initial fast equalization timeout durationof the peer chip, and stores the larger value (namely, the first fastequalization timeout duration) into the third register of the chip. Inaddition, the system software reads the foregoing stored parameters fromthe external storage medium, the chip, or the peer chip, and then writesthe parameters into the second register. Then, the chip may perform theN^(th) time of link equalization based on the foregoing parametersstored in the second register and the first fast equalization timeoutduration stored in the third register.

It should be understood that the external storage medium is a storagemedium at a location other than the chip, the peer chip, and the systemsoftware.

The chip in this embodiment can implement the method according to anyone of the first aspect or the possible implementations of the firstaspect, and therefore shorten duration of an equalization phase.

It should be understood that the second register is a register thatstores initial parameters used for link equalization. Before the secondregister stores the first equalization parameters or the transmitparameter and the receive parameter of the chip in the firstequalization parameters, the second register stores a hardwareinitialize value.

In addition, it should be noted that the transceiver may not send thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters. In thiscase, the chip may store the first equalization parameters or thereceive parameter and the transmit parameter of the chip in the firstequalization parameters into a register or firmware of the chip.Further, if the chip has a CPU or a component or unit with a functionthat can be implemented by a CPU, the transceiver may not receive thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters, but firstreads the foregoing parameters stored in the register or the firmware ofthe chip, and then writes the foregoing parameters into a location thatis in the second register and that is used to store the initialparameters.

In an embodiment, the transceiver is further adapted to send secondequalization parameters that meet the link stability requirement andthat are obtained when the N^(th) time of link equalization isperformed, or a receive parameter and a transmit parameter of the chipin the second equalization parameters, where the second equalizationparameters include the receive parameter and the transmit parameter ofthe chip and a receive parameter and a transmit parameter of the peerchip.

It should be noted that the transceiver may not send the secondequalization parameters or the receive parameter and the transmitparameter of the chip in the second equalization parameters. In thiscase, the chip may store the second equalization parameters or thereceive parameter and the transmit parameter of the chip in the secondequalization parameters into the register or the firmware of the chip.

In an embodiment, the transceiver is further adapted to receive clearingindication information, where the clearing indication information isused to clear the first fast equalization timeout duration; and

the manager is further adapted to clear the first fast equalizationtimeout duration based on the clearing indication information.

In an embodiment, the transceiver is further adapted to receive secondfast equalization timeout duration and the receive parameter and thetransmit parameter of the chip in the second equalization parameters,where the second fast equalization timeout duration is the same as thefirst fast equalization timeout duration. The manager is further adaptedto: set the receive parameter and the transmit parameter of the chip inthe second equalization parameters in the second register, and set thesecond fast equalization timeout duration in the third register; andwhen the transceiver receives second link repair indication information,perform an (N+b)^(th) time of link equalization based on the second fastequalization timeout duration and the receive parameter and the transmitparameter of the chip in the second equalization parameters, where thesecond link repair indication information is used to trigger the(N+b)^(th) time of link equalization, the second fast equalizationtimeout duration is equalization timeout duration that is of the chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, and isequalization timeout duration that is of the peer chip in the thirdphase of equalization and that exists when the (N+b)^(th) time of linkequalization is performed and equalization timeout duration that is ofthe peer chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, b≥1, and b is aninteger.

It should be understood that, in the third register, a location that isused to store the second fast equalization timeout duration is the sameas a location that is used to store the first fast equalization timeoutduration. In the second register, a location that is used to store thefirst equalization parameters (or the receive parameter and the transmitparameter of the chip in the first equalization parameters) may be thesame as or different from a location that is used to store the secondequalization parameters (or the receive parameter and the transmitparameter of the chip in the second equalization parameters). When thetwo locations are different, either the first equalization parameters orthe second equalization parameters may be used as the initialparameters.

According to a seventh aspect, a communications system is provided,where the communications system includes system software, a primarychip, and a secondary chip. The primary chip may be the chip provided inany one of the fifth aspect or the possible implementations of the fifthaspect, and the secondary chip may be the chip provided in any one ofthe sixth aspect or the possible implementations of the sixth aspect.The primary chip and the secondary chip are connected to each other byusing a peripheral component interconnect express PCIe bus or a cachecoherent interconnect for accelerators CCIX bus. The system software mayimplement the method in any one of the first aspect or the possibleimplementations of the first aspect.

For example, the system software may be adapted to: store firstequalization parameters that meet a link stability requirement and thatare obtained when an (N−a)^(th) time of link equalization is performed,where the first equalization parameters include a receive parameter anda transmit parameter of the primary chip and a receive parameter and atransmit parameter of the secondary chip, N≥2, 1≤a≤N, and both a and Nare integers;

when determining that an N^(th) time of link equalization needs to beperformed, read initial fast equalization timeout duration of theprimary chip and initial fast equalization timeout duration of thesecondary chip, where the initial fast equalization timeout duration ofthe primary chip is less than or equal to equalization timeout durationthat is of the primary chip in a fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed, theinitial fast equalization timeout duration of the secondary chip is lessthan or equal to equalization timeout duration that is of the secondarychip in a third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed, both the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip are device advertisevalues, and both the equalization timeout duration that is of theprimary chip in the fourth phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed and theequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the (N-a)^(th) time of linkequalization is performed are hardware initialize values; and

configure first fast equalization timeout duration based on the initialfast equalization timeout duration of the primary chip and the initialfast equalization timeout duration of the secondary chip, and invoke thefirst equalization parameters, so that the primary chip and thesecondary chip perform the N^(th) time of link equalization based on thefirst fast equalization timeout duration and the first equalizationparameters, where the first fast equalization timeout duration is alarger value in the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, and the first fast equalization timeout duration isequalization timeout duration that is of the primary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe primary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

It should be understood that, for beneficial effects of the sixth aspector the possible implementations of the sixth aspect, refer to beneficialeffects of the foregoing associated embodiments. Details are notdescribed herein again.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram of a processor system to whicha PCIe bus is applied according to this application;

FIG. 2 is a schematic diagram of a signal channel between an RC and avideo card according to this application;

FIG. 3 is a flowchart of link establishment specified in a PCIestandard;

FIG. 4 is a flowchart of a fast equalization method according to thisapplication;

FIG. 5 shows a manner used for indicating fast equalization timeoutduration according to this application;

FIG. 6 shows another manner used for indicating fast equalizationtimeout duration;

FIG. 7 is a schematic diagram of a fast equalization apparatus accordingto this application;

FIG. 8 is a schematic diagram of another fast equalization apparatusaccording to this application;

FIG. 9 is a schematic diagram of still another fast equalizationapparatus according to this application;

FIG. 10 is a schematic structural diagram of a chip according to thisapplication;

FIG. 11 is a schematic structural diagram of another chip according tothis application; and

FIG. 12 is a schematic structural diagram of a communications systemaccording to this application.

DESCRIPTION OF EMBODIMENTS

PCIe is a high-speed serial computer expansion bus standard, and is atype of computer bus standard PCI. PCIe follows a programming conceptand communication standard of an existing PCI bus. A PCIe bus uses ahigh-speed serial point-to-point dual-channel high-bandwidthtransmission manner, and therefore has a faster transmission rate thanthe PCI bus. A CCIX bus is based on a same physical architecture as thePCIe bus. The physical architecture includes an electrical sub-block anda logical sub-block. In addition, the CCIX bus supports transmissionrates of PCIe 1.0, PCIe 2.0, PCIe 3.0, and PCIe 4.0.

It should be noted that the PCIe/CCIX bus may be applied not only tointernal interconnection but also to peripheral interconnection. Itshould be noted that in this application, the PCIe/CCIX bus means thePCIe bus or the CCIX bus.

The following uses only a processor system (or may also be referred toas a “PCIe system”) to which the PCIe bus is applied as an example todescribe the solutions in this application. It should be learned that aprocessor system to which the CCIX bus is applied also has a same orsimilar feature. For details, refer to the following descriptions of theprocessor system to which the PCIe bus is applied. Therefore, detailsare not described again.

FIG. 1 shows a processor system to which a PCIe bus is applied.Referring to FIG. 1 , the system includes a root complex (RC), a switchchip (switch), a PCIe-to-PCI bridge, and the like.

Specifically, the RC is also referred to as a root controller of thesystem, and is usually integrated into a central processing unit (CPU).The RC usually includes a plurality of ports. The RC may be connected toone component through each of the plurality of ports. The plurality ofports may include a plurality of ports (briefly referred to as PCIeports) that are adapted to be connected to a PCIe bus. The RC may beconnected to an endpoint through a PCIe port. Naturally, the RC and theendpoint are connected to each other by using the PCIe bus. For example,as shown in FIG. 1 , the endpoint may be a video card, a networkadapter, an optical channel card, a switch, an application-specificintegrated circuit (ASIC), or the like. In the processor system shown inFIG. 1 , the RC and a DDR (double data rate) are connected to each otherby using a DDR bus. Therefore, a port that is on the RC and that isconnected to the DDR is not a PCIe port. Therefore, the plurality ofports of the RC may be all or partially PCIe ports.

The switch is adapted to perform link expansion on the RC. Specifically,the switch and the RC are connected to each other by using the PCIe bus.In addition, the switch has a plurality of ports, and the switch may beconnected to an EP through one port by using the PCIe bus. Therefore,the RC may be connected to a plurality of endpoints through one portbased on the switch. As shown in FIG. 1 , the switch has three ports.The switch may be connected to one ASIC through any one of the threeports by using the PCIe bus.

The PCIe-to-PCI bridge is used for bridging, and is used to implementconversion between a PCIe bus and a PCI bus, to be compatible with anoriginal endpoint that supports the PCI bus. As shown in FIG. 1 , oneend of a PCIe-to-PCI bridge is connected to the switch by using the PCIebus, and the other end is connected to the PCI bus. Further, FIG. 1further shows a plurality of PCI slots that support a PCI bus standard.A chip or a card inserted into the PCI slot can be connected to thePCIe-to-PCI bridge by using the PCI bus, and is further connected to theCPU by using the switch.

It should be noted that the RC and the endpoint may be connected to eachother directly by using the PCIe bus, or may be connected to each otherby using the PCIe bus and a connector. As shown in FIG. 2 , the RC andthe video card are connected to each other successively by using a PCIebus, a connector, a PCIe bus, a connector, and a PCIe bus. It is easy tounderstand that lengths of a plurality of PCIe buses located between theRC and the endpoint may be the same or different.

For ease of understanding, the “system” mentioned a plurality of timesin this application is described herein. The system described in thisapplication is a system (briefly referred to as a “PCIe/CCIX system”) towhich a PCIe/CCIX bus is applied. The PCIe/CCIX system may include onecentral processing unit CPU and one or more peripheral devices of theCPU. The PCIe/CCIX bus is used for at least one of one or more channelsbetween the CPU and the peripheral devices of the CPU. The PCIe/CCIXsystem may further include a plurality of CPUs and peripheral devices ofthe CPUs. The PCIe/CCIX bus is used for at least one of channels betweenthe plurality of CPUs, or the PCIe/CCIX bus is used for at least one ofone or more channels between one CPU and one or more peripheral devicesof the CPU.

FIG. 3 is a flowchart of powering-on to communication connectionestablishment in a PCIe system. As specified in a PCIe standard, afterpowering-on or reset, a primary chip and a secondary chip performpowering-on calibration, and then a link state machine in each of theprimary chip and the secondary chip controls a link to sequentiallyenter the following phases: a detect phase, a polling phase, aconfiguration phase, a linkup phase, and a recovery phase. Specifically,in the detect phase, the primary chip and the secondary chip each detectwhether a peer is present. After it is detected that the peer ispresent, the polling phase is entered. In this phase, bit and symbollocking and channel polarity determining are mainly performed. Then, theconfiguration phase is entered, to determine a link bandwidth and a linknumber, and perform channel-to-channel phase compensation and the like.After configuration is completed, the link runs to the linkup phase at alow rate, that is, a connection is established between the primary chipand the secondary chip. Subsequently, the system enters the recoveryphase to perform rate switching and equalization.

Equalization in PCIe/CCIX is a process of optimizing parameters of anequalization circuit at all high rates (including 8 G, 16 G, and 32 G)to select a better parameter for stable running of the link.Equalization includes four phases, namely, a first phase (phase 0), asecond phase (phase 1), a third phase (phase 2), and a fourth phase(phase 3).

In phase 0, the primary chip sends, to the secondary chip, initialparameters that need to be used by the secondary chip. In an embodimentof this application, maximum stay duration of an endpoint in this phaseis 12 ms.

It should be noted that in the four phases of equalization, maximum stayduration of the primary chip (or the secondary chip) in any one of thefour phases is equalization timeout duration of the primary chip (or thesecondary chip) in this phase. For example, maximum stay duration of theprimary chip in phase 3 of equalization is equalization timeout durationof the primary chip in phase 3. Maximum stay duration of the secondarychip in phase 2 of equalization is equalization timeout duration of thesecondary chip in phase 2.

In phase 1, data is sent/received between the primary chip and thesecondary chip at a higher rate obtained after rate change, andspecified initial parameters are used for the receiving/sendingoperation. Specifically, in this phase, the primary chip first sendsdata to the secondary chip. The secondary chip stays for a while afterreceiving the data. After determining that a bit error rate of the datais less than 10E-4, the secondary chip enters a next phase, namely,phase 2. Before the secondary chip enters the next phase, the secondarychip feeds back one piece of information to the primary chip to indicatethat the secondary chip is to enter the next phase. After receiving theinformation, the primary chip is also to enter the next phase.Optionally, maximum stay duration of the secondary chip in phase 1 is 12ms, and maximum stay duration of the primary chip in phase 1 is 24 ms.

In phase 2, the secondary chip adjusts a transmit (Tx) parameter of theprimary chip, and correspondingly adjusts a receive (Rx) parameter ofthe secondary chip, to expect the bit error rate of the link between thesecondary chip and the primary chip to be less than 10E-12. If the biterror rate between the secondary chip and the primary chip does not meetthe foregoing requirement within maximum stay duration of the secondarychip in phase 2, both the primary chip and the secondary chip exit anequalization process, and return to an upper-level rate (for example,return to 2.5 G if negotiation about 8 G times out). Then, after a timeperiod, system software controls the equalization process to beperformed for the link again at the rate. In a current technology,maximum stay duration of the primary chip and the maximum stay durationof the secondary chip in this phase are set by default.

In phase 3, the primary chip adjusts a transmit (Tx) parameter of thesecondary chip, and correspondingly adjusts a receive (Rx) parameter ofthe primary chip, to expect the bit error rate of the link between thesecondary chip and the primary chip to be less than 10E-12. If the biterror rate between the secondary chip and the primary chip does not meetthe foregoing requirement within maximum stay duration of the primarychip in phase 3, both the primary chip and the secondary chip exit theequalization process, and return to the upper-level rate (for example,return to 2.5 G if negotiation about 8 G times out). Then, after a timeperiod, the system software controls the equalization process to beperformed for the link again at the rate. In the current technology, themaximum stay duration of the primary chip and maximum stay duration ofthe secondary chip in this phase are set by default.

When rate change is completed for the first time and the link can runstably, rate change is performed to reach a higher-level rate, and theforegoing rate change equalization process is repeated, until parametersthat meet a link stability requirement at each rate are found. Afterequalization at all rates supported by the chip is completed, the linkruns at a highest rate supported by the chip or service data istransmitted at a highest rate that can meet the link stabilityrequirement.

A device is affected by factors such as an environment and chip aging ina long-term use process, and consequently a PCIe/CCIX link may beabnormal, for example, rate reduction or a bit error occurs. To enablethe link to run stably continuously, the system software repairs thelink according to a policy formulated in a design phase. Repairing thelink is equivalent to retraining the link, and includes the equalizationprocess. To reduce duration consumed in a link equalization processtriggered by the system software, this application provides a fastequalization method. The following describes the method in detail.

It should be noted that the primary chip in this application is a chipthat includes a downstream port (DSP). Sometimes, the primary chip isalso briefly referred to as a downstream port. The secondary chip inthis application is a chip that includes an upstream port (USP).Sometimes, the secondary chip is also briefly referred to as an upstreamport. Further, with reference to FIG. 1 , it may be learned that in thisapplication, the primary chip may be an RC or a switch chip. When theprimary chip is the RC, the secondary chip may be an endpoint or aswitch chip. When the primary chip is the switch chip, the secondarychip may be an endpoint device. The endpoint device may be a video card,a network adapter, an optical channel card, a storage card, a switchchip, or the like. In addition, in this application, the primary chipand the secondary chip may be located in a same processor system ordifferent processor systems. Optionally, the primary chip and thesecondary chip are connected to each other by using a PCIe/CCIX bus.

FIG. 4 is a schematic flowchart of a fast equalization method accordingto an embodiment of this application. As shown in FIG. 4 , the methodmainly includes S410 to S430. The method may be performed by systemsoftware or a system management chip. The system software may be a basicinput/output system (BIOS). It should be learned that the BIOS issoftware that is first loaded after a device is powered on. After theBIOS is loaded, an upper-layer operating system (OS) is led to bestarted. In a running phase of the BIOS, the BIOS may perform the fastequalization method provided in this application.

S410. Store first equalization parameters that meet a link stabilityrequirement and that are obtained when an (N−a)^(th) time of linkequalization is performed.

The first equalization parameters include a receive parameter and atransmit parameter of a primary chip and a receive parameter and atransmit parameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers.

In an embodiment, when the (N−a)^(th) time of link equalization needs tobe performed, for example, when link equalization after powering-on orreset needs to be performed, the primary chip and the secondary chip mayperform link equalization based on the equalization process describedabove. When rate change is completed for the first time and a link canrun stably, the system software (or the system management chip) may readparameters that meet the link stability requirement, and then store theparameters. Then, the primary chip and the secondary chip perform ratechange to reach a higher-level rate, and repeat the foregoingequalization process and storage operation, until parameters that meetthe link stability requirement at each rate are stored. It may beunderstood that parameters that meet the link stability requirement at arate include a transmit parameter of the primary chip and a receiveparameter of the secondary chip that meet the link stability requirement(for example, a bit error rate is less than 10E-12) and that areobtained in phase 2 of equalization at the rate, and a receive parameterof the primary chip and a transmit parameter of the secondary chip thatmeet the link stability requirement (for example, the bit error rate isless than 10E-12) and that are obtained in phase 3 of equalization atthe rate.

It should be understood that the first equalization parameters includethe parameters that meet the link stability requirement at each rate.

For example, after reading the first equalization parameters, the systemsoftware may store the first equalization parameters into the primarychip (for example, firmware or a register of the primary chip); or thesystem software may store the transmit parameter and the receiveparameter of the primary chip in the first equalization parameters intothe primary chip, and store the transmit parameter and the receiveparameter of the secondary chip in the first equalization parametersinto the secondary chip (for example, firmware or a register of thesecondary chip); or the system software may store the first equalizationparameters into an external storage medium. The external storage mediumis a storage medium at a location other than the primary chip, thesecondary chip, and the system software.

Alternatively, S410 may be performed by the primary chip and thesecondary chip or one of the primary chip and the secondary chip.Specifically, after obtaining the transmit parameter and the receiveparameter of the primary chip, the primary chip may store the transmitparameter and the receive parameter of the primary chip into the primarychip, for example, firmware or a register of the primary chip. Afterobtaining the transmit parameter and the receive parameter of thesecondary chip, the secondary chip may store the transmit parameter andthe receive parameter of the secondary chip into the secondary chip, forexample, firmware or a register of the secondary chip. Alternatively,the primary chip (or the secondary chip) may store the firstequalization parameters into the primary chip (or the secondary chip).

It should be understood that, the register that is in the primary chipand that is adapted to store the first equalization parameters or thetransmit parameter and the receive parameter of the primary chip in thefirst equalization parameters may be a register newly added in theprimary chip, or may be a register reserved in the primary chip. This isnot limited in this embodiment of this application. Similarly, theregister that is in the secondary chip and that is adapted to store thefirst equalization parameters or the transmit parameter and the receiveparameter of the secondary chip in the first equalization parameters maybe a register newly added in the secondary chip, or may be a registerreserved in the secondary chip.

In an embodiment of this application, a>1. For example, a=2, andperforming the (N−2)^(th) time of link equalization may be performinglink equalization during powering-on. This is not limited in thisapplication. In this case, in a subsequent step S430, the used firstequalization parameters may be parameters obtained when the (N−2)^(th)time of link equalization is performed.

In another embodiment of this application, a=1. For example, performingthe (N−1)^(th) time of link equalization may be performing linkequalization during reset. In this case, in a subsequent step S430, theused first equalization parameters may be parameters obtained when the(N−1)^(th) time of link equalization is performed.

It should be noted that if the (N−2)^(th) time of link equalization isfurther performed before the (N−1)^(th) time of link equalization isperformed, when the parameters obtained when the (N−1)^(th) time of linkequalization is performed are stored, the parameters obtained when the(N−₂)^(th) time of link equalization is performed may be overwritten.Alternatively, when the parameters obtained when the (N−1)^(th) time oflink equalization is performed are the same as the parameters obtainedwhen the (N−₂)^(th) time of link equalization is performed, theparameters obtained when the (N−1)^(th) time of link equalization isperformed may not be stored.

In an embodiment, both equalization timeout duration that is of theprimary chip in a third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed and equalizationtimeout duration that is of the primary chip in a fourth phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed are hardware initialize (hardware initialize)values, and both equalization timeout duration that is of the secondarychip in the third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed and equalizationtimeout duration that is of the secondary chip in the fourth phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed are hardware initialize values. For example,the equalization timeout duration that is of the primary chip in thethird phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed and the equalization timeout durationthat is of the primary chip in the fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed eachmay be a value obtained after initialization calibration is performed ona physical layer (PHY) of the primary chip and the register isinitialized. Similarly, the equalization timeout duration that is of thesecondary chip in the third phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed and theequalization timeout duration that is of the secondary chip in thefourth phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed each may be a value obtained afterinitialization calibration is performed on a physical layer PHY of thesecondary chip and the register is initialized. The process ofperforming initialization calibration on the PHY may be completed in apowering-on calibration process, or may be completed after the linkenters a linkup phase at a low rate (for example, 2.5 G) and before ratechange is performed to reach a higher rate. Further, the foregoinghardware initialize value of the primary chip may be determined based ona PHY capability of the primary chip. Similarly, the foregoing hardwareinitialize value of the secondary chip may be determined based on a PHYcapability of the secondary chip.

It should be noted that in this application, hardware initializedequalization timeout duration in the third phase of equalization andhardware initialized equalization timeout duration in the fourth phaseof equalization may be used for both equalization timeout duration inthe third phase of equalization and equalization timeout duration in thefourth phase of equalization in a link equalization process triggered bynon-system software.

For example, both the hardware initialized equalization timeout durationin the third phase of equalization and the hardware initializedequalization timeout duration in the fourth phase of equalization may berepresented by at least 3 bits. For example, referring to FIG. 5 , theequalization timeout duration in the third phase is represented by avalue at bit locations 20, 21, and 22, and the equalization timeoutduration in the fourth phase is represented by a value at bit locations16, 17, and 18. For details of the value at the bit locations 16, 17,and 18, the value at the bit locations 20, 21, and 22, a correspondencebetween the value at the bit locations 20, 21, and 22 and theequalization timeout duration in the third phase, and a correspondencebetween the value at the bit locations 16, 17, and 18 and theequalization timeout duration in the fourth phase, refer to the priorart. Details are not described herein again.

S420. When determining that an N^(th) time of link equalization needs tobe performed, read initial fast equalization timeout duration of theprimary chip and initial fast equalization timeout duration of thesecondary chip.

The initial fast equalization timeout duration of the primary chip isless than or equal to the equalization timeout duration that is of theprimary chip in the fourth phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed. The initial fastequalization timeout duration of the secondary chip is less than orequal to the equalization timeout duration that is of the secondary chipin the third phase of equalization and that exists when the (N−a)^(th)time of link equalization is performed. Both the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip are device advertisevalues.

In an embodiment, the initial fast equalization timeout duration of theprimary chip may be a value obtained after initialization calibration isperformed on the physical layer PHY of the primary chip and the registeris initialized. Similarly, the initial fast equalization timeoutduration of the secondary chip may be a value obtained afterinitialization calibration is performed on the physical layer PHY of thesecondary chip and the register is initialized. The process ofperforming initialization calibration on the PHY may be completed in thepowering-on calibration process, or may be completed after the linkenters the linkup phase at a low rate (for example, 2.5 G) and beforerate change is performed to reach a higher rate.

In an embodiment, the initial fast equalization timeout duration may berepresented by at least 3 bits. For example, referring to FIG. 6 , theinitial fast equalization timeout duration is represented by 3 bits, andlocations of the 3 bits are 8, 9, and 10. Further, for a correspondencebetween a value at the bit locations 8, 9, and 10 and the initial fastequalization timeout duration, refer to Table 1.

TABLE 1 Value at bit Initial fast equalization Bit locations locationstimeout duration 10:8 000 0 001  8 ms/16 ms 010 24 ms/32 ms 100 50 ms/58ms 100 100 ms/108 ms 101 200 ms/208 ms

When a register shown in FIG. 6 is the register of the primary chip, itmay be learned from Table 1 that, 000 represents that the initial fastequalization timeout duration is 0, and a value other than 000represents initial fast equalization timeout duration that is not 0. Ifthe initial fast equalization timeout duration is 0, it indicates thatthe primary chip does not enable fast equalization. If the initial fastequalization timeout duration is not 0, it indicates that the primarychip enables fast equalization. For example, 001 represents that initialfast equalization timeout duration of the primary chip in the thirdphase and the fourth phase of equalization is 8 ms/16 ms. Similarly,when a register shown in FIG. 6 is the register of the secondary chip,it may be learned from Table 1 that, 000 represents that the initialfast equalization timeout duration is 0, and a value other than 000represents initial fast equalization timeout duration that is not 0. Ifthe initial fast equalization timeout duration is 0, it indicates thatthe secondary chip does not enable fast equalization. If the initialfast equalization timeout duration is not 0, it indicates that thesecondary chip enables fast equalization. For example, 001 representsthat initial fast equalization timeout duration of the secondary chip inthe third phase and the fourth phase of equalization is 8 ms/16 ms.

S430. Configure first fast equalization timeout duration based on theinitial fast equalization timeout duration of the primary chip and theinitial fast equalization timeout duration of the secondary chip, andinvoke the first equalization parameters, so that the primary chip andthe secondary chip perform the N^(th) time of link equalization based onthe first equalization parameters and the first fast equalizationtimeout duration.

The first fast equalization timeout duration is a larger value in theinitial fast equalization timeout duration of the primary chip and theinitial fast equalization timeout duration of the secondary chip. Thefirst fast equalization timeout duration is equalization timeoutduration that is of the primary chip in the third phase of equalizationand that exists when the N^(th) time of link equalization is performedand equalization timeout duration that is of the primary chip in thefourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the secondary chip in the third phase of equalization andthat exists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the secondary chip in thefourth phase of equalization and that exists when the N^(th) time oflink equalization is performed.

In an embodiment, when the system software determines that the N^(th)time of link equalization needs to be performed, for example, when thesystem software (or the system management chip) determines that the linkneeds to be repaired (for example, determines that hot reset or linkretrain needs to be triggered), the system software may read the initialfast equalization timeout duration stored in the primary chip and readthe initial fast equalization timeout duration stored in the secondarychip. Then, the system software compares the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip, and writes the larger value inthe initial fast equalization timeout duration of the primary chip andthe initial fast equalization timeout duration of the secondary chipinto the register of the primary chip and the register of the secondarychip. In addition, the system software stores the first equalizationparameters into a register that is in the primary chip and that isadapted to store initial parameters. Subsequently, the system software(or the system management chip) may trigger the N^(th) time of linkequalization by sending first link repair indication information to theprimary chip and the secondary chip, for example, trigger hot reset orlink retrain. After the primary chip and the secondary chip enter arecovery phase based on the first link repair indication information,the primary chip and the secondary chip use the first fast equalizationtimeout duration, and invoke the first equalization parameters as theinitial parameters, to perform the N^(th) time of link equalization.According to different scenarios in which the N^(th) time of linkequalization is triggered, in the N^(th) time of link equalization,equalization may be performed at each rate, or may be performed only ata rate.

An example in which equalization is performed at each rate is used. Inphase 0, the primary chip sends, to the secondary chip, initialparameters (namely, the transmit parameter and the receive parameter ofthe secondary chip in the first equalization parameters) that need to beused by the secondary chip. When the primary chip and the secondary chipswitch to a target rate in phase 1, the primary chip sends data to thesecondary chip by using the transmit parameter of the primary chip inthe first equalization parameters, and the secondary chip receives thedata by using the receive parameter of the secondary chip in the firstequalization parameters. Because the transmit parameter of the primarychip and the receive parameter of the secondary chip in the firstequalization parameters are parameters that are selected in the(N−a)^(th) time of equalization and that relatively match the link,bit/symbol locking can be quickly implemented, and a requirement thatthe bit error rate of data is less than 10E-4 is met. Then, the primarychip and the secondary chip may enter phase 2. In phase 2, the secondarychip adjusts the transmit parameter of the primary chip and the receiveparameter of the secondary chip. Similarly, because the transmitparameter of the primary chip and the receive parameter of the secondarychip in the first equalization parameters relatively match the link, andan initial bit error rate of the link is relatively low, the secondarychip needs to slightly adjust (for example, one to two times) only thereceive parameter of the secondary chip and the transmit parameter ofthe primary chip, to meet the link stability requirement (for example,the bit error rate is less than 10E-12). In this way, it can be ensuredthat the primary chip and the secondary chip complete equalizationwithin the first fast equalization timeout duration, thereby reducingequalization timeout duration. Similarly, in phase 3, the secondary chipfirst sends data to the primary chip by using the transmit parameter ofthe secondary chip in the first equalization parameters, and the primarychip receives the data by using the receive parameter of the primarychip in the first equalization parameters. In this case, if the linkstability requirement (for example, the bit error rate is less than10E-12) is not met, the primary chip adjusts the receive parameter ofthe primary chip and the transmit parameter of the secondary chip.Because the receive parameter of the primary chip and the transmitparameter of the secondary chip in the first equalization parametersrelatively match the link, and the initial bit error rate of the link isrelatively low, the primary chip needs to slightly adjust (for example,one to two times) only the receive parameter of the primary chip and thetransmit parameter of the secondary chip, to meet the link stabilityrequirement (for example, the bit error rate is less than 10E-12). Inthis way, it can be ensured that the primary chip and the secondary chipcomplete equalization within the first fast equalization timeoutduration, thereby reducing duration required in the equalizationprocess. After rate change is completed and the link can run stably, theprimary chip and the secondary chip perform rate change to reach ahigher-level rate, repeatedly use the first fast equalization timeoutduration, and invoke parameters that are in the first equalizationparameters and that correspond to the rate as initial equalizationparameters, to perform link equalization, until parameters that meet thelink stability requirement at each rate are found again. It should benoted that the first equalization parameters include parameterscorresponding to one or more rates, and the one or more rates include arate that is to be reached after the primary chip and the secondary chipperform rate change to reach a higher-level rate. In this case,parameters that are in the first equalization parameters and thatcorrespond to the to-be-reached rate are “the parameters that are in thefirst equalization parameters and that correspond to the rate”. Afterlink equalization at all rates supported by the chip is completed,before the N^(th) time of link equalization is performed for the link,the link runs at a highest rate or service data is transmitted at ahighest rate that can meet the link stability requirement.

It should be noted that in S410, if the first equalization parametersare stored into the external storage medium, before the system softwaretriggers the N^(th) time of link equalization, the system software mayfirst read the first equalization parameters from the external storagemedium, and then write the first equalization parameters into theregister that is in the primary chip and that is adapted to store theinitial parameters. Alternatively, the system software writes thetransmit parameter and the receive parameter of the primary chip in thefirst equalization parameters into the register that is in the primarychip and that is adapted to store the initial parameters, and writes thetransmit parameter and the receive parameter of the secondary chip inthe first equalization parameters into a register that is in thesecondary chip and that is adapted to store the initial parameters.However, in this case, before phase 0, the secondary chip needs to sendthe transmit parameter and the receive parameter of the secondary chipin the first equalization parameters to the primary chip, so that theprimary chip sends the transmit parameter and the receive parameter ofthe secondary chip in the first equalization parameters to the secondarychip as the initial parameters of the secondary chip in phase 0.

In S410, if the first equalization parameters are stored into theprimary chip, before phase 0, the primary chip (or the system software)first reads the first equalization parameters from a location at whichthe first equalization parameters are stored, and then writes the firstequalization parameters into the register that is in the primary chipand that is adapted to store the initial parameters.

In S410, if the transmit parameter and the receive parameter of theprimary chip in the first equalization parameters are stored into theprimary chip, and the transmit parameter and the receive parameter ofthe secondary chip in the first equalization parameters are stored intothe secondary chip, before the system software triggers the N^(th) timeof link equalization, the primary chip (or the system software) firstreads the transmit parameter and the receive parameter of the primarychip in the first equalization parameters from a location at which thetransmit parameter and the receive parameter of the primary chip in thefirst equalization parameters are stored, and then writes the readparameters into the register that is in the primary chip and that isadapted to store the initial parameters. In addition, the secondary chipneeds to send the transmit parameter and the receive parameter of thesecondary chip in the first equalization parameters to the primary chip,so that the primary chip sends the transmit parameter and the receiveparameter of the secondary chip in the first equalization parameters tothe secondary chip as the initial parameters of the secondary chip inphase 0.

It should be understood that in S430, the first equalization parametersoverwrite initial parameters previously stored in a register adapted tostore the initial parameters. It should be understood that the initialparameters previously stored in the register adapted to store theinitial parameters are hardware initialize values (or device advertisevalues). When the (N−a)^(th) time of link equalization is performed,used initial parameters are initial parameters that are stored in theregister adapted to store the initial parameters and that exists beforethe (N−a)^(th) time of link equalization is performed.

In an embodiment, fast equalization timeout duration (for example, thefirst fast equalization timeout duration) may be represented by at least3 bits. For example, referring to FIG. 5 , the fast equalization timeoutduration is represented by 3 bits, and locations of the 3 bits are 26,27, and 28. Further, for a correspondence between a value at the bitlocations 26, 27, and 28 and the fast equalization timeout duration,refer to Table 2. It should be understood that a possible value of theinitial fast equalization timeout duration shown in Table 1 is the sameas a possible value of the fast equalization timeout duration shown inTable 2.

TABLE 2 Value at bit Fast equalization Bit locations locations timeoutduration 28:26 000 0 001  8 ms/16 ms 010 24 ms/32 ms 100 50 ms/58 ms 100100 ms/108 ms 101 200 ms/208 ms

When a register shown in FIG. 5 is the register of the primary chip, itmay be learned from Table 2 that, 000 represents that the fastequalization timeout duration is 0, and a value other than 000represents fast equalization timeout duration that is not 0. If the fastequalization timeout duration is 0, it indicates that the primary chipdoes not enable fast equalization. If the fast equalization timeoutduration is not 0, it indicates that the primary chip enables fastequalization. For example, 001 represents that equalization timeoutduration of the primary chip in the third phase and the fourth phase ofequalization is 8 ms/16 ms. Similarly, when a register shown in FIG. 5is the register of the secondary chip, it may be learned from Table 2that, 000 represents that the fast equalization timeout duration is 0,and a value other than 000 represents fast equalization timeout durationthat is not 0. If the fast equalization timeout duration is 0, itindicates that the secondary chip does not enable fast equalization. Ifthe fast equalization timeout duration is not 0, it indicates that thesecondary chip enables fast equalization. For example, 001 representsthat equalization timeout duration of the secondary chip in the thirdphase and the fourth phase of equalization is 8 ms/16 ms. It should benoted that the fast equalization timeout duration of the primary chip isthe same as the fast equalization timeout duration of the secondarychip.

For example, if a value at bit locations 8, 9, and 10 in the register ofthe primary chip shown in FIG. 5 is 001, and a value at bit locations 8,9, and 10 in the register of the secondary chip shown in FIG. 5 is 011,a value at bit locations 26, 27, and 28 in the register shown in FIG. 6is 011.

In an embodiment of this application, before S420, the method mayfurther include: determining, by the system software, whether theprimary chip supports fast equalization, and determining whether thesecondary chip supports fast equalization. In addition, the systemsoftware performs S420 only when determining that both the primary chipand the secondary chip support fast equalization. On the contrary, thesystem software does not perform S420 when one of the primary chip andthe secondary chip does not support fast equalization.

Further, when determining that the initial fast equalization timeoutduration of the primary chip is not 0, the system software determinesthat the primary chip supports fast equalization. Similarly, whendetermining that the initial fast equalization timeout duration of thesecondary chip is not 0, the system software determines that thesecondary chip supports fast equalization. It may be understood thatS420 is performed only when bit values indicating that the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip are not 0.

In an embodiment, when the N^(th) time of link equalization needs to beperformed, the system software may first read the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip. If the initial fastequalization timeout duration of the primary chip is not 0 and theinitial fast equalization timeout duration of the secondary chip is not0, the system software compares the two pieces of initial fastequalization timeout duration, and configures the first fastequalization timeout duration based on a comparison result.

It should be understood that whether the primary chip supports fastequalization means whether the first fast equalization timeout durationis allowed to be configured for the primary chip, or whether the primarychip can perform link equalization by using the first fast equalizationtimeout duration and the first equalization parameters. Similarly,whether the secondary chip supports fast equalization means whether thefirst fast equalization timeout duration is allowed to be configured forthe secondary chip, or whether the secondary chip can perform linkequalization by using the first fast equalization timeout duration andthe first equalization parameters. Only when the first fast equalizationtimeout duration is allowed to be configured for both the primary chipand the secondary chip, or only when both the primary chip and thesecondary chip can perform link equalization by using the first fastequalization timeout duration and the first equalization parameters, thefirst fast equalization timeout duration can be configured.

It should be further understood that in this application, configuringthe first fast equalization timeout duration is equivalent to enablingfast equalization. When fast equalization is enabled, in the linkequalization process, the hardware initialized equalization timeoutduration in the third phase and the hardware initialized equalizationtimeout duration in the fourth phase are ignored. In an embodiment, thehardware initialized equalization timeout duration in the third phaseand the hardware initialized equalization timeout duration in the fourthphase are not used. Instead, the first fast equalization timeoutduration is used as the equalization timeout duration of the primarychip in the third phase of equalization, the equalization timeoutduration of the secondary chip in the fourth phase of equalization, andthe equalization timeout duration of the secondary chip in the thirdphase of equalization.

It should be noted that in an embodiment of this application, both theprimary chip and the secondary chip may alternatively support fastequalization by default. To be specific, before S420, whether theprimary chip supports fast equalization and whether the secondary chipsupports fast equalization do not need to be determined. Instead, thefirst fast equalization timeout duration is directly configured.

Therefore, in the fast equalization method in an embodiment of thisapplication, when a current time of link equalization is performed,previously stored equalization parameters that meet the link stabilityrequirement and equalization timeout duration shorter than that in theprior art are used, so that duration of an equalization phase can beshortened. Because the equalization timeout duration is relativelyshort, in the fast equalization method in this embodiment of thisapplication, a probability that an entire link repair (for example, hotreset or link retrain) process is completed within is can be improvedwhile it is ensured that a high-speed high-loss link can run stably, toavoid the following problem as much as possible: Waiting times out inthe link repair process initiated by the system software, andconsequently the system software considers that the link is unavailable.

In addition, in the fast equalization method in an embodiment of thisapplication, waiting duration (namely, Is) that is of the systemsoftware during link repair and that is specified in a current protocoldoes not need to be changed. Therefore, compatibility of a PCIe/CCIXprotocol can be well implemented, and a modification operation onvarious versions of the system software due to a compatibility problemcan also be avoided.

Further, after the link is stabilized at a highest rate, the systemsoftware (or the system management chip) may clear the first fastequalization timeout duration, for example, clear the value at the bitlocations 26, 27, and 28 of the register shown in FIG. 6 , that is, setthe value at the bit locations 26, 27, and 28 of the register shown inFIG. 6 to 000.

In an embodiment, after the N^(th) time of link equalization isperformed, the system software (or the system management chip) may clearthe first fast equalization timeout duration.

In an embodiment, second equalization parameters that meet the linkequalization requirement and that are obtained when the N^(th) time oflink equalization is performed may be stored for subsequent linkequalization. The second equalization parameters include a receiveparameter and a transmit parameter of the primary chip and a receiveparameter and a transmit parameter of the secondary chip.

It should be understood that the storage operation herein may beperformed by the system software (or the system management chip), or maybe performed by the primary chip and/or the secondary chip. For details,refer to the foregoing descriptions of S410. Details are not describedherein again. It should be further understood that the secondequalization parameters may overwrite the previously stored firstequalization parameters.

Further, the method may further include: when determining that an(N+b)^(th) time of link equalization needs to be performed, configuring,by the system software, second fast equalization timeout duration, andinvoking the second equalization parameters, so that the primary chipand the secondary chip perform the (N+b)^(th) time of link equalizationbased on the second equalization parameters and the second fastequalization timeout duration. The second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

For example, after a time period following performing of the N^(th) timeof link equalization, if the system software (or the system managementchip) determines that link repair needs to be performed again (forexample, determines that heat reset or link retrain needs to betriggered), the system software may configure the second fastequalization timeout duration, and invoke the second equalizationparameters. Then, the system software may send second link repairindication information to the primary chip and the secondary chip totrigger the (N+b)^(th) time of link equalization, for example, hot resetor link retrain. After entering the recovery phase based on the secondlink repair indication information, the primary chip and the secondarychip use the second fast equalization timeout duration, and invoke thesecond equalization parameters as initial equalization parameters, toperform the (N+b)^(th) time of link equalization. For details of aprocess of performing the (N+b)^(th) time of link equalization, refer tothe foregoing descriptions of the process of performing the N^(th) timeof link equalization. Details are not described herein again.

In the fast equalization method in this embodiment of this application,when a current time of fast equalization is performed, equalizationparameters that are obtained when fast equalization is previouslyperformed and that enables the link to run stably are used, so that thelink can quickly reach a stable state, thereby reducing durationrequired in a link equalization process.

This application further provides a fast equalization apparatus. Theapparatus may be adapted to perform the foregoing fast equalizationmethod. Therefore, for the apparatus in this embodiment, refer to therelated limitations and descriptions in the foregoing method embodiment.For brevity, a same or similar part is not described again in thisembodiment. It should be noted that the apparatus in this embodiment maybe a system management chip.

FIG. 7 shows a fast equalization apparatus 700 according to anembodiment. The apparatus 700 includes a manager 701 and a transceiver702.

The manager 701 is adapted to store first equalization parameters thatmeet a link stability requirement and that are obtained when an(N−a)^(th) time of link equalization is performed, where the firstequalization parameters include a receive parameter and a transmitparameter of a primary chip and a receive parameter and a transmitparameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers.

In an embodiment, the manager 701 may store the first equalizationparameters into the primary chip or an external storage medium. Themanager 701 may alternatively store related parameters of the primarychip in the first equalization parameters into the primary chip, andstore related parameters of the secondary chip in the first equalizationparameters into the secondary chip.

The transceiver 702 is adapted to: when the manager 701 determines thatan N^(th) time of link equalization needs to be performed, read initialfast equalization timeout duration of the primary chip and initial fastequalization timeout duration of the secondary chip, where the initialfast equalization timeout duration of the primary chip is less than orequal to equalization timeout duration that is of the primary chip in afourth phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed, the initial fast equalization timeoutduration of the secondary chip is less than or equal to equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, both the initial fast equalization timeoutduration of the primary chip and the initial fast equalization timeoutduration of the secondary chip are device advertise values, and both theequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed and the equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N−a)^(th) time of link equalization is performed are hardwareinitialize values.

The manager 701 is further adapted to: configure first fast equalizationtimeout duration based on the initial fast equalization timeout durationof the primary chip and the initial fast equalization timeout durationof the secondary chip, and invoke the first equalization parameters, sothat the primary chip and the secondary chip perform the N^(th) time oflink equalization based on the first fast equalization timeout durationand the first equalization parameters, where the first fast equalizationtimeout duration is a larger value in the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip, and the first fast equalizationtimeout duration is equalization timeout duration that is of the primarychip in the third phase of equalization and that exists when the N^(th)time of link equalization is performed and equalization timeout durationthat is of the primary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the first equalization parameters invoked by the manager 701when the N^(th) time of link equalization is performed. In an embodimentof this application, the manager 701 is further adapted to: determinewhether the primary chip supports fast equalization, and determinewhether the secondary chip supports the fast equalization.

Correspondingly, that the manager 701 is further adapted to configurefirst fast equalization timeout duration specifically includes:configuring the first fast equalization timeout duration when both theprimary chip and the secondary chip support the fast equalization.

Further, that the manager 701 is further adapted to determine whetherthe primary chip supports fast equalization specifically includes: whenthe initial fast equalization timeout duration of the primary chip isnot 0, determining that the primary chip supports the fast equalization.

Similarly, that the manager 701 is further adapted to determine whetherthe secondary chip supports the fast equalization specifically includes:when the initial fast equalization timeout duration of the secondarychip is not 0, determining that the secondary chip supports the fastequalization.

In an embodiment of this application, the manager 701 is further adaptedto store second equalization parameters that meet the link stabilityrequirement and that are obtained when the N^(th) time of linkequalization is performed, where the second equalization parametersinclude a receive parameter and a transmit parameter of the primary chipand a receive parameter and a transmit parameter of the secondary chip.

In an embodiment of this application, after the N^(th) time of linkequalization is performed, the manager 701 is further adapted to clearthe first fast equalization timeout duration.

In an embodiment of this application, the manager 701 is further adaptedto: when determining that an (N+b)^(th) time of link equalization needsto be performed, configure second fast equalization timeout duration,and invoke the second equalization parameters, so that the primary chipand the secondary chip perform the (N+b)^(th) time of link equalizationbased on the second fast equalization timeout duration and the secondequalization parameters, where the second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

This application further provides a second type of fast equalizationapparatus. The apparatus may also be adapted to perform the foregoingfast equalization method. Therefore, for the apparatus in thisembodiment, refer to the related limitations and descriptions in theforegoing method embodiment. It should be noted that the apparatus inthis embodiment may be a BIOS.

FIG. 8 shows a fast equalization apparatus 800 according to anembodiment. The apparatus includes a storage unit 801, a read unit 802,a determining unit 803, and a configuration and invoking unit 804.

The storage unit 801 is adapted to store first equalization parametersthat meet a link stability requirement and that are obtained when an(N−a)^(th) time of link equalization is performed, where the firstequalization parameters include a receive parameter and a transmitparameter of a primary chip and a receive parameter and a transmitparameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers.

In an embodiment, the storage unit 801 may store the first equalizationparameters into the primary chip or an external storage medium. Thestorage unit 801 may alternatively store related parameters of theprimary chip in the first equalization parameters into the primary chip,and store related parameters of the secondary chip in the firstequalization parameters into the secondary chip.

The read unit 802 is adapted to: when the determining unit 803determines that an N^(th) time of link equalization needs to beperformed, read initial fast equalization timeout duration of theprimary chip and initial fast equalization timeout duration of thesecondary chip, where the initial fast equalization timeout duration ofthe primary chip is less than or equal to equalization timeout durationthat is of the primary chip in a fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed, theinitial fast equalization timeout duration of the secondary chip is lessthan or equal to equalization timeout duration that is of the secondarychip in a third phase of equalization and that exists when the(N−a)^(1h) time of link equalization is performed, both the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip are device advertisevalues, and both the equalization timeout duration that is of theprimary chip in the fourth phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed and theequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed are hardware initialize values.

The configuration and invoking unit 804 is adapted to: configure firstfast equalization timeout duration based on the initial fastequalization timeout duration of the primary chip and the initial fastequalization timeout duration of the secondary chip, and invoke thefirst equalization parameters, so that the primary chip and thesecondary chip perform the N^(th) time of link equalization, where thefirst fast equalization timeout duration is a larger value in theinitial fast equalization timeout duration of the primary chip and theinitial fast equalization timeout duration of the secondary chip, andthe first fast equalization timeout duration is equalization timeoutduration that is of the primary chip in the third phase of equalizationand that exists when the N^(th) time of link equalization is performedand equalization timeout duration that is of the primary chip in thefourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the secondary chip in the third phase of equalization andthat exists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the secondary chip in thefourth phase of equalization and that exists when the N^(th) time oflink equalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the first equalization parameters invoked by the configurationand invoking unit 804 when the N^(th) time of link equalization isperformed.

In an embodiment of this application, the determining unit 803 isfurther adapted to: determine whether the primary chip supports fastequalization, and determine whether the secondary chip supports the fastequalization. Correspondingly, that the configuration and invoking unit804 is adapted to configure first fast equalization timeout durationbased on the initial fast equalization timeout duration of the primarychip and the initial fast equalization timeout duration of the secondarychip specifically includes: configuring the first fast equalizationtimeout duration when both the primary chip and the secondary chipsupport the fast equalization.

In an embodiment of this application, that the determining unit 803 isfurther adapted to determine whether the primary chip supports fastequalization specifically includes: when the initial fast equalizationtimeout duration of the primary chip is not 0, determining that theprimary chip supports the fast equalization.

Further, that the determining unit 803 is further adapted to determinewhether the secondary chip supports the fast equalization specificallyincludes: when the initial fast equalization timeout duration of thesecondary chip is not 0, determining that the secondary chip supportsthe fast equalization.

In an embodiment of this application, the storage unit 801 is furtheradapted to store second equalization parameters that meet the linkstability requirement and that are obtained when the N^(th) time of linkequalization is performed, where the second equalization parametersinclude a receive parameter and a transmit parameter of the primary chipand a receive parameter and a transmit parameter of the secondary chip.

In an embodiment of this application, after the N^(th) time of linkequalization is performed, the configuration and invoking unit 804 isfurther adapted to clear the first fast equalization timeout duration.

In an embodiment of this application, the configuration and invokingunit 804 is further adapted to: when the determining unit 803 determinesthat an (N+b)^(th) time of link equalization needs to be performed,configure second fast equalization timeout duration, and invoke thesecond equalization parameters, so that the primary chip and thesecondary chip perform the (N+b)^(th) time of link equalization based onthe second fast equalization timeout duration and the secondequalization parameters, where the second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

This application further provides a third type of fast equalizationapparatus. The apparatus may also be adapted to perform the foregoingfast equalization method. Correspondingly, for the apparatus, refer tothe related limitations in the foregoing method embodiment. A same orsimilar part is not described again in this embodiment.

FIG. 9 shows a fast equalization apparatus 900 according to anembodiment. The apparatus 900 includes a central processing unit (CPU)901 and a memory 902. The memory 902 is adapted to store code. The CPU901 is adapted to execute the code stored in the memory 902, toimplement a function of the apparatus 900 in this embodiment. It shouldbe learned that the CPU 901 is a CPU in a processor system to which aPCIe bus applied.

The memory 902 is adapted to store first equalization parameters thatmeet a link stability requirement and that are obtained when an(N−a)^(th) time of link equalization is performed, where the firstequalization parameters include a receive parameter and a transmitparameter of a primary chip and a receive parameter and a transmitparameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers.

It should be understood that the foregoing storage operation may beperformed by the CPU 901.

In an embodiment, the memory 902 or the CPU 901 may store the firstequalization parameters into the primary chip or an external storagemedium. The memory 902 or the CPU 901 may alternatively store relatedparameters of the primary chip in the first equalization parameters intothe primary chip, and store related parameters of the secondary chip inthe first equalization parameters into the secondary chip.

The CPU 901 is adapted to: when determining that an N^(th) time of linkequalization needs to be performed, read initial fast equalizationtimeout duration of the primary chip and initial fast equalizationtimeout duration of the secondary chip, where the initial fastequalization timeout duration of the primary chip is less than or equalto equalization timeout duration that is of the primary chip in a fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the initial fast equalization timeoutduration of the secondary chip is less than or equal to equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, both the initial fast equalization timeoutduration of the primary chip and the initial fast equalization timeoutduration of the secondary chip are device advertise values, and both theequalization timeout duration that is of the primary chip in the fourthphase of equalization and that exists when the (N−a)^(th) time of linkequalization is performed and the equalization timeout duration that isof the secondary chip in the third phase of equalization and that existswhen the (N−a)^(th) time of link equalization is performed are hardwareinitialize values.

The CPU 901 is further adapted to: configure first fast equalizationtimeout duration based on the initial fast equalization timeout durationof the primary chip and the initial fast equalization timeout durationof the secondary chip, and invoke the first equalization parameters, sothat the primary chip and the secondary chip perform the N^(th) time oflink equalization, where the first fast equalization timeout duration isa larger value in the initial fast equalization timeout duration of theprimary chip and the initial fast equalization timeout duration of thesecondary chip, and the first fast equalization timeout duration isequalization timeout duration that is of the primary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe primary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed, and isequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and equalization timeout duration that is ofthe secondary chip in the fourth phase of equalization and that existswhen the N^(th) time of link equalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the first equalization parameters invoked by the CPU 901 whenthe N^(th) time of link equalization is performed.

In an embodiment of this application, the CPU 901 is further adapted to:determine whether the primary chip supports fast equalization, anddetermine whether the secondary chip supports the fast equalization.Correspondingly, that the CPU 901 is adapted to configure first fastequalization timeout duration based on the initial fast equalizationtimeout duration of the primary chip and the initial fast equalizationtimeout duration of the secondary chip specifically includes:configuring the first fast equalization timeout duration when both theprimary chip and the secondary chip support the fast equalization.

In an embodiment of this application, that the CPU 901 is furtheradapted to determine whether the primary chip supports fast equalizationspecifically includes: when the initial fast equalization timeoutduration of the primary chip is not 0, determining that the primary chipsupports the fast equalization.

Further, that the CPU 901 is further adapted to determine whether thesecondary chip supports the fast equalization specifically includes:when the initial fast equalization timeout duration of the secondarychip is not 0, determining that the secondary chip supports the fastequalization.

In an embodiment of this application, the memory 902 is further adaptedto store second equalization parameters that meet the link stabilityrequirement and that are obtained when the N^(th) time of linkequalization is performed, where the second equalization parametersinclude a receive parameter and a transmit parameter of the primary chipand a receive parameter and a transmit parameter of the secondary chip.

It should be understood that the storage operation herein may beperformed by the CPU 901.

In an embodiment of this application, after the N^(th) time of linkequalization is performed, the CPU 901 is further adapted to clear thefirst fast equalization timeout duration.

In an embodiment of this application, the CPU 901 is further adapted to:when determining that an (N+b)^(th) time of link equalization needs tobe performed, configure second fast equalization timeout duration, andinvoke the second equalization parameters, so that the primary chip andthe secondary chip perform the (N+b)^(th) time of link equalizationbased on the second fast equalization timeout duration and the secondequalization parameters, where the second fast equalization timeoutduration is equalization timeout duration that is of the primary chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the primary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, andis equalization timeout duration that is of the secondary chip in thethird phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed and equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.

This application further provides a chip 1000, and the chip is theprimary chip in the foregoing embodiment. As shown in FIG. 10 , the chip1000 includes a transceiver 1010, a first register 1020, a secondregister 1030, a third register 1040, and a manager 1050.

The transceiver 1010 is adapted to send first equalization parameters ora receive parameter and a transmit parameter of the chip in the firstequalization parameters, where the first equalization parameters areparameters that meet a link stability requirement and that are obtainedwhen an (N−a)^(th) time of link equalization is performed, the firstequalization parameters include the receive parameter and the transmitparameter of the chip and a receive parameter and a transmit parameterof a peer chip, N≥2, 1≤a≤N, and both a and N are integers.

The first register 1020 is adapted to store initial fast equalizationtimeout duration of the chip, where the initial fast equalizationtimeout duration of the chip is less than or equal to equalizationtimeout duration that is of the chip in a fourth phase of equalizationand that exists when the (N−a)^(th) time of link equalization isperformed, the initial fast equalization timeout duration of the chip isa device advertise value, and the equalization timeout duration that isof the chip in the fourth phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed is a hardwareinitialize value.

The transceiver 1010 is further adapted to: send the initial fastequalization timeout duration of the chip, and receive first fastequalization timeout duration and the first equalization parameters,where the first fast equalization timeout duration is a larger value inthe initial fast equalization timeout duration of the chip and initialfast equalization timeout duration of the peer chip, the initial fastequalization timeout duration of the peer chip is less than or equal toequalization timeout duration that is of the peer chip in a third phaseof equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the equalization timeout duration that is ofthe peer chip in the third phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed is a hardwareinitialize value, and the initial fast equalization timeout duration ofthe peer chip is a device advertise value.

The manager 1050 is adapted to: set the first equalization parameters inthe second register 1030, and set the first fast equalization timeoutduration in the third register 1040. Alternatively, the second register1030 is adapted to set the first equalization parameters, and the thirdregister 1040 is adapted to set the first fast equalization timeoutduration.

The manager 1050 is further adapted to: when the transceiver 1010receives first link repair indication information, perform an N^(th)time of link equalization based on the first fast equalization timeoutduration and the first equalization parameters, where the first linkrepair indication information is used to trigger the N^(th) time of linkequalization, and the first fast equalization timeout duration isequalization timeout duration that is of the chip in the third phase ofequalization and that exists when the N^(th) time of link equalizationis performed and equalization timeout duration that is of the chip inthe fourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the peer chip in the third phase of equalization and thatexists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the peer chip in the fourthphase of equalization and that exists when the N^(th) time of linkequalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the first equalization parameters used by the manager 1050 whenperforming the N^(th) time of link equalization.

Specifically, in this embodiment, when the (N−a)^(th) time of linkequalization is performed, after a link runs stably, the chip sends, tosystem software (or a system management chip), parameters of the chip(or parameters of the chip and parameters of the peer chip) that meetthe link stability requirement. The system software may store thereceived parameters into the chip or an external storage medium, or thesystem software stores the received parameters of the chip into thechip. When determining that the N^(th) time of link equalization needsto be performed, the system software reads the initial fast equalizationtimeout duration of the chip from the first register of the chip,determines the larger value in the initial fast equalization timeoutduration of the chip and the initial fast equalization timeout durationof the peer chip, and writes the larger value (namely, the first fastequalization timeout duration) into the third register of the chip. Inaddition, the system software reads the foregoing stored parameters fromthe external storage medium or the chip, and then writes the parametersinto the second register. Then, the chip may perform the N^(th) time oflink equalization based on the foregoing parameters stored in the secondregister and the first fast equalization timeout duration stored in thethird register.

It should be understood that the external storage medium is a storagemedium at a location other than the chip, the peer chip, and the systemsoftware.

It should be understood that the second register is a register thatstores initial parameters used for link equalization. Before the secondregister stores the first equalization parameters or the transmitparameter and the receive parameter of the chip in the firstequalization parameters, the second register stores a hardwareinitialize value.

In addition, it should be noted that the transceiver may not send thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters. In thiscase, the chip may store the first equalization parameters or thereceive parameter and the transmit parameter of the chip in the firstequalization parameters into a register or firmware of the chip.Further, if the chip has a CPU or a component or unit with a functionthat can be implemented by a CPU, the transceiver may not receive thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters, but firstreads the foregoing parameters stored in the register or the firmware ofthe chip, and then writes the foregoing parameters into a location thatis in the second register and that is used to store the initialparameters.

In an embodiment of this application, the transceiver 1010 is furtheradapted to send second equalization parameters that meet the linkstability requirement and that are obtained when the N^(th) time of linkequalization is performed, or a receive parameter and a transmitparameter of the chip in the second equalization parameters, where thesecond equalization parameters include the receive parameter and thetransmit parameter of the chip and a receive parameter and a transmitparameter of the peer chip.

It should be noted that the transceiver may not send the secondequalization parameters or the receive parameter and the transmitparameter of the chip in the second equalization parameters. In thiscase, the chip may store the second equalization parameters or thereceive parameter and the transmit parameter of the chip in the secondequalization parameters into the register or the firmware of the chip.

In an embodiment of this application, the transceiver 1010 is furtheradapted to receive clearing indication information, where the clearingindication information is used to clear the first fast equalizationtimeout duration. After performing the N^(th) time of link equalization,the manager 1050 is further adapted to clear the first fast equalizationtimeout duration based on the clearing indication information.

In an embodiment of this application, the transceiver 1010 is furtheradapted to receive second fast equalization timeout duration and thesecond equalization parameters, where the second fast equalizationtimeout duration is the same as the first fast equalization timeoutduration. The second register 1030 is further adapted to store thesecond equalization parameters.

The manager 1050 is further adapted to: set the second equalizationparameters in the second register 1030, and set the second fastequalization timeout duration in the third register 1040. Alternatively,the second register 1030 is further adapted to set the secondequalization parameters, and the third register 1040 is further adaptedto set the second fast equalization timeout duration.

The manager 1050 is further adapted to: when the transceiver 1010receives second link repair indication information, perform an(N+b)^(th) time of link equalization based on the second fastequalization timeout duration and the second equalization parameters,where the second link repair indication information is used to triggerthe (N+b)^(th) time of link equalization, the second fast equalizationtimeout duration is equalization timeout duration that is of the chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, and isequalization timeout duration that is of the peer chip in the thirdphase of equalization and that exists when the (N+b)^(th) time of linkequalization is performed and equalization timeout duration that is ofthe peer chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, b≥1, and b is aninteger.

It should be understood that, in the third register, a location that isused to store the second fast equalization timeout duration is the sameas a location that is used to store the first fast equalization timeoutduration. In the second register, a location that is used to store thefirst equalization parameters (or the receive parameter and the transmitparameter of the chip in the first equalization parameters) may be thesame as or different from a location that is used to store the secondequalization parameters (or the receive parameter and the transmitparameter of the chip in the second equalization parameters). When thetwo locations are different, either the first equalization parameters orthe second equalization parameters may be used as the initialparameters.

This application further provides a chip 1100, and the chip 1100 is thesecondary chip in the foregoing embodiment. As shown in FIG. 11 , thechip 1100 includes a transceiver 1110, a first register 1120, a secondregister 1130, a third register 1140, and a manager 1150.

The transceiver 1110 is adapted to send first equalization parameters ora receive parameter and a transmit parameter of the chip in the firstequalization parameters, where the first equalization parameters areparameters that meet a link stability requirement and that are obtainedwhen an (N−a)^(th) time of link equalization is performed, the firstequalization parameters include the receive parameter and the transmitparameter of the chip and a receive parameter and a transmit parameterof a peer chip, N≥2, 1≤a≤N, and both a and N are integers.

The first register 1120 is adapted to store initial fast equalizationtimeout duration of the chip, where the initial fast equalizationtimeout duration of the chip is less than or equal to equalizationtimeout duration that is of the chip in a third phase of equalizationand that exists when the (N−a)^(th) time of link equalization isperformed, the initial fast equalization timeout duration of the chip isa device advertise value, and the equalization timeout duration that isof the chip in the third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed is a hardwareinitialize value.

The transceiver 1110 is further adapted to: send the initial fastequalization timeout duration of the chip, and receive first fastequalization timeout duration and the receive parameter and the transmitparameter of the chip in the first equalization parameters, where thefirst fast equalization timeout duration is a larger value in theinitial fast equalization timeout duration of the chip and initial fastequalization timeout duration of the peer chip, the initial fastequalization timeout duration of the peer chip is less than or equal toequalization timeout duration that is of the peer chip in a fourth phaseof equalization and that exists when the (N−a)^(th) time of linkequalization is performed, the equalization timeout duration that is ofthe peer chip in the fourth phase of equalization and that exists whenthe (N−a)^(th) time of link equalization is performed is a hardwareinitialize value, and the initial fast equalization timeout duration ofthe peer chip is a device advertise value.

The manager 1150 is adapted to: set the receive parameter and thetransmit parameter of the chip in the first equalization parameters inthe second register 1130, and set the first fast equalization timeoutduration in the third register 1140. Alternatively, the second register1130 is adapted to set the receive parameter and the transmit parameterof the chip in the first equalization parameters, and the third register1140 is adapted to set the first fast equalization timeout duration.

The manager 1150 is further adapted to: when the transceiver 1110receives first link repair indication information, perform an N^(th)time of link equalization based on the first fast equalization timeoutduration and the receive parameter and the transmit parameter of thechip in the first equalization parameters, where the first link repairindication information is used to trigger the N^(th) time of linkequalization, and the first fast equalization timeout duration isequalization timeout duration that is of the chip in the third phase ofequalization and that exists when the N^(th) time of link equalizationis performed and equalization timeout duration that is of the chip inthe fourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the peer chip in the third phase of equalization and thatexists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the peer chip in the fourthphase of equalization and that exists when the N^(th) time of linkequalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the receive parameter and the transmit parameter that are ofthe chip in the first equalization parameters and that are used by themanager 1150 when performing the N^(th) time of link equalization.

In an embodiment, when the (N−a)^(th) time of link equalization isperformed, after a link runs stably, the chip sends, to system software(or a system management chip), parameters of the chip (or parameters ofthe chip and parameters of the peer chip) that meet the link stabilityrequirement. The system software may store the received parameters intothe chip, an external storage medium, or the peer chip, or the systemsoftware stores the received parameters of the chip into the chip. Whendetermining that the N^(th) time of link equalization needs to beperformed, the system software reads the initial fast equalizationtimeout duration of the chip from the first register of the chip,determines the larger value in the initial fast equalization timeoutduration of the chip and the initial fast equalization timeout durationof the peer chip, and stores the larger value (namely, the first fastequalization timeout duration) into the third register of the chip. Inaddition, the system software reads the foregoing stored parameters fromthe external storage medium, the chip, or the peer chip, and then writesthe parameters into the second register. Then, the chip may perform theN^(th) time of link equalization based on the foregoing parametersstored in the second register and the first fast equalization timeoutduration stored in the third register.

It should be understood that the external storage medium is a storagemedium at a location other than the chip, the peer chip, and the systemsoftware.

It should be understood that the second register is a register thatstores initial parameters used for link equalization. Before the secondregister stores the first equalization parameters or the transmitparameter and the receive parameter of the chip in the firstequalization parameters, the second register stores a hardwareinitialize value.

In addition, it should be noted that the transceiver may not send thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters. In thiscase, the chip may store the first equalization parameters or thereceive parameter and the transmit parameter of the chip in the firstequalization parameters into a register or firmware of the chip.Further, if the chip has a CPU or a component or unit with a functionthat can be implemented by a CPU, the transceiver may not receive thefirst equalization parameters or the receive parameter and the transmitparameter of the chip in the first equalization parameters, but firstreads the foregoing parameters stored in the register or the firmware ofthe chip, and then writes the foregoing parameters into a location thatis in the second register and that is used to store the initialparameters.

In an embodiment of this application, the transceiver 1110 is furtheradapted to send second equalization parameters that meet the linkstability requirement and that are obtained when the N^(th) time of linkequalization is performed, or a receive parameter and a transmitparameter of the chip in the second equalization parameters, where thesecond equalization parameters include the receive parameter and thetransmit parameter of the chip and a receive parameter and a transmitparameter of the peer chip.

It should be noted that the transceiver 1110 may not send the secondequalization parameters or the receive parameter and the transmitparameter of the chip in the second equalization parameters. In thiscase, the chip may store the second equalization parameters or thereceive parameter and the transmit parameter of the chip in the secondequalization parameters into the register or the firmware of the chip.

In an embodiment of this application, the transceiver 1110 is furtheradapted to receive clearing indication information, where the clearingindication information is used to clear the first fast equalizationtimeout duration. After performing the N^(th) time of link equalization,the manager 1150 is further adapted to clear the first fast equalizationtimeout duration based on the clearing indication information.

In an embodiment of this application, the transceiver 1110 is furtheradapted to receive second fast equalization timeout duration and thereceive parameter and the transmit parameter of the chip in the secondequalization parameters, where the second fast equalization timeoutduration is the same as the first fast equalization timeout duration.

The manager 1150 is further adapted to: set the receive parameter andthe transmit parameter of the chip in the second equalization parametersin the second register, and set the second fast equalization timeoutduration in the third register. Alternatively, the second register 1130is further adapted to set the second equalization parameters, and thethird register 1140 is further adapted to set the second fastequalization timeout duration.

The manager 1150 is further adapted to: when the transceiver 1110receives second link repair indication information, perform an(N+b)^(th) time of link equalization based on the second fastequalization timeout duration and the receive parameter and the transmitparameter of the chip in the second equalization parameters, where thesecond link repair indication information is used to trigger the(N+b)^(th) time of link equalization, the second fast equalizationtimeout duration is equalization timeout duration that is of the chip inthe third phase of equalization and that exists when the (N+b)^(th) timeof link equalization is performed and equalization timeout duration thatis of the chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, and isequalization timeout duration that is of the peer chip in the thirdphase of equalization and that exists when the (N+b)^(th) time of linkequalization is performed and equalization timeout duration that is ofthe peer chip in the fourth phase of equalization and that exists whenthe (N+b)^(th) time of link equalization is performed, b≥1, and b is aninteger.

It should be understood that, in the third register, a location that isused to store the second fast equalization timeout duration is the sameas a location that is used to store the first fast equalization timeoutduration. In the second register, a location that is used to store thefirst equalization parameters (or the receive parameter and the transmitparameter of the chip in the first equalization parameters) may be thesame as or different from a location that is used to store the secondequalization parameters (or the receive parameter and the transmitparameter of the chip in the second equalization parameters). When thetwo locations are different, either the first equalization parameters orthe second equalization parameters may be used as the initialparameters.

This application further provides a communications system 1200. As shownin FIG. 12 , the communications system 1200 includes system software1210, a primary chip 1220, and a secondary chip 1230. The primary chip1220 and the secondary chip 1230 are connected to each other by using aPCIe/CCIX bus. It should be noted that the system software 1210 may be aBIOS.

The system software 1210 may be adapted to: store first equalizationparameters that meet a link stability requirement and that are obtainedwhen an (N−a)^(th) time of link equalization is performed, where thefirst equalization parameters include a receive parameter and a transmitparameter of the primary chip 1220 and a receive parameter and atransmit parameter of the secondary chip 1230, N≥2, 1≤a≤N, and both aand N are integers;

when determining that an N^(th) time of link equalization needs to beperformed, read initial fast equalization timeout duration of theprimary chip 1220 and initial fast equalization timeout duration of thesecondary chip 1230, where the initial fast equalization timeoutduration of the primary chip 1220 is less than or equal to equalizationtimeout duration that is of the primary chip 1220 in a fourth phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, the initial fast equalization timeoutduration of the secondary chip 1230 is less than or equal toequalization timeout duration that is of the secondary chip 1230 in athird phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed, both the initial fast equalizationtimeout duration of the primary chip 1220 and the initial fastequalization timeout duration of the secondary chip 1230 are deviceadvertise values, and both the equalization timeout duration that is ofthe primary chip 1220 in the fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed andthe equalization timeout duration that is of the secondary chip 1230 inthe third phase of equalization and that exists when the (N−a)^(th) timeof link equalization is performed are hardware initialize values; and

configure first fast equalization timeout duration based on the initialfast equalization timeout duration of the primary chip 1220 and theinitial fast equalization timeout duration of the secondary chip 1230,and invoke the first equalization parameters, so that the primary chip1220 and the secondary chip 1230 perform the N^(th) time of linkequalization based on the first fast equalization timeout duration andthe first equalization parameters, where the first fast equalizationtimeout duration is a larger value in the initial fast equalizationtimeout duration of the primary chip 1220 and the initial fastequalization timeout duration of the secondary chip 1230, and the firstfast equalization timeout duration is equalization timeout duration thatis of the primary chip 1220 in the third phase of equalization and thatexists when the N^(th) time of link equalization is performed andequalization timeout duration that is of the primary chip 1220 in thefourth phase of equalization and that exists when the N^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the secondary chip 1230 in the third phase of equalizationand that exists when the N^(th) time of link equalization is performedand equalization timeout duration that is of the secondary chip 1230 inthe fourth phase of equalization and that exists when the N^(th) time oflink equalization is performed.

It should be noted that the first equalization parameters includeparameters corresponding to one or more rates, and the one or more ratesinclude a rate that is to be reached after the N^(th) time of linkequalization is performed. In this case, parameters that are in thefirst equalization parameters and that correspond to the to-be-reachedrate are the first equalization parameters invoked by the systemsoftware 1210 when the N^(th) time of link equalization is performed.

In an embodiment, the system software may further include a memory 1240,and the memory may be adapted to store the first equalizationparameters.

In an embodiment of this application, the system software 1210 isfurther adapted to: determine whether the primary chip 1220 supportsfast equalization, and determine whether the secondary chip 1230supports the fast equalization. Correspondingly, that the systemsoftware 1210 configures first fast equalization timeout durationspecifically includes: configuring the first fast equalization timeoutduration when both the primary chip 1220 and the secondary chip 1230support the fast equalization.

Further, that the system software 1210 determines whether the primarychip 1220 supports fast equalization specifically includes: when theinitial fast equalization timeout duration of the primary chip 1220 isnot 0, determining that the primary chip 1220 supports the fastequalization.

Similarly, that the system software 1210 determines whether thesecondary chip 1230 supports the fast equalization specificallyincludes: when the initial fast equalization timeout duration of thesecondary chip 1230 is not 0, determining that the secondary chip 1230supports the fast equalization.

In an embodiment of this application, the system software 1210 isfurther adapted to store second equalization parameters that meet thelink stability requirement and that are obtained when the N^(th) time oflink equalization is performed, where the second equalization parametersinclude a receive parameter and a transmit parameter of the primary chip1220 and a receive parameter and a transmit parameter of the secondarychip 1230.

In an embodiment of this application, after the N^(th) time of linkequalization is performed, the system software 1210 is further adaptedto clear the first fast equalization timeout duration.

In an embodiment of this application, the system software 1210 isfurther adapted to: when determining that an (N+b)^(th) time of linkequalization needs to be performed, configure second fast equalizationtimeout duration, and invoke the second equalization parameters, so thatthe primary chip 1220 and the secondary chip 1230 perform the (N+b)^(th)time of link equalization based on the second fast equalization timeoutduration and the second equalization parameters. The second fastequalization timeout duration is equalization timeout duration that isof the primary chip 1220 in the third phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed andequalization timeout duration that is of the primary chip 1220 in thefourth phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed, and is equalization timeout durationthat is of the secondary chip 1230 in the third phase of equalizationand that exists when the (N+b)^(th) time of link equalization isperformed and equalization timeout duration that is of the secondarychip 1230 in the fourth phase of equalization and that exists when the(N+b)^(th) time of link equalization is performed, the second fastequalization timeout duration is the same as the first fast equalizationtimeout duration, b≥1, and b is an integer.

It should be noted that, for the foregoing apparatus, chip, andcommunications system, refer to the related descriptions in the methodembodiment. Because unity exists between subjects protected by thisapplication, there are many same or similar parts in descriptions ofthese subjects. For brevity, the method embodiment is comprehensivelyand fully described in this application document, and other embodimentsare relatively simplified.

A person of ordinary skill in the art may be aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, units and algorithm steps may be implemented by usingelectronic hardware or a combination of computer software and electronichardware. Whether the functions are performed by hardware or softwaredepends on particular applications and design constraints of thetechnical solutions. A person skilled in the art may use differentmethods to implement the described functions for each particularapplication, but it should not be considered that the implementationgoes beyond the scope of this application.

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, refer to acorresponding process in the foregoing method embodiment. Details arenot described herein again.

In the several embodiments provided in this application, it should beunderstood that the disclosed system, apparatus, and method may beimplemented in other manners. For example, the described apparatusembodiment is merely an example. For example, the unit division ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented by using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected based on actualrequirements to achieve the objectives of the solutions of theembodiments.

In addition, function units in the embodiments of this application maybe integrated into one processing unit, or each of the units may existalone physically, or two or more units may be integrated into one unit.

When the functions are implemented in the form of a software functionunit and sold or used as an independent product, the functions may bestored in a computer readable storage medium. Based on such anunderstanding, the technical solutions of this application essentially,or the part contributing to the prior art, or some of the technicalsolutions may be implemented in a form of a software product. Thecomputer software product is stored in a storage medium, and includesseveral instructions for instructing a computer device (which may be apersonal computer, a server, a network device, or the like) to performall or some of the steps of the methods described in the embodiments ofthis application. The foregoing storage medium includes any medium thatcan store program code, such as a USB flash drive, a removable harddisk, a read-only memory (ROM), a random access memory (RAM), a magneticdisk, or an optical disc.

The foregoing descriptions are merely specific implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement readily figured out by aperson skilled in the art within the technical scope disclosed in thisapplication shall fall within the protection scope of this application.Therefore, the protection scope of this application shall be subject tothe protection scope of the claims.

1. A fast equalization method, comprising: storing first equalizationparameters that satisfy a link stability requirement and are obtainedwhen an (N−a)^(th) time of link equalization is performed, wherein thefirst equalization parameters comprise a receive parameter and atransmit parameter of a primary chip and a receive parameter and atransmit parameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers; and in response to determining that an N^(th) time of linkequalization needs to be performed, reading a first initial fastequalization timeout duration of the primary chip and a second initialfast equalization timeout duration of the secondary chip, wherein thefirst initial fast equalization timeout duration is less than or equalto an equalization timeout duration that is of the primary chip in afourth phase of equalization and that exists when the (N−a)^(th) time oflink equalization is performed, wherein the second initial fastequalization timeout duration is less than or equal to an equalizationtimeout duration that is of the secondary chip in a third phase ofequalization and that exists when the (N−a)^(th) time of linkequalization is performed, wherein both the first and second initialfast equalization timeout durations are device advertised values and arehardware initialized values.
 2. The method according to claim 1, furthercomprising: configuring a first fast equalization timeout duration basedon the first and second initial fast equalization timeout durations; andinvoking the first equalization parameters, so that the primary chip andthe secondary chip perform the N^(th) time of link equalization based onthe first fast equalization timeout duration and the first equalizationparameters, wherein the first fast equalization timeout duration is alarger value of the first and second initial fast equalization timeoutdurations, wherein the first fast equalization timeout durationrepresents an equalization timeout duration that is of the primary chipin the third phase of equalization and that exists when the N^(th) timeof link equalization is performed and an equalization timeout durationthat is of the primary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed, andwherein the first fast equalization timeout duration represents anequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and an equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed.
 3. Themethod according to claim 2, wherein invoking the first equalizationparameters comprises: invoking parameters corresponding to a rate thatneeds to be reached after the N^(th) time of link equalization isperformed and that are in the first equalization parameters, so that theprimary chip and the secondary chip perform the N^(th) time of linkequalization based on the first fast equalization timeout duration andthe parameters corresponding to the rate.
 4. The method according toclaim 2, wherein before configuring the first fast equalization timeoutduration based on the first and second initial fast equalization timeoutdurations, the method further comprises: determining whether the primarychip supports fast equalization; and determining whether the secondarychip supports the fast equalization; and wherein configuring the firstfast equalization timeout duration comprises: configuring the first fastequalization timeout duration in response to determining that both theprimary chip and the secondary chip support the fast equalization. 5.The method according to claim 4, wherein determining whether the primarychip supports fast equalization comprises: when the first initial fastequalization timeout duration is not 0, determining that the primarychip supports the fast equalization.
 6. The method according to claim 4,wherein determining whether the secondary chip supports the fastequalization comprises: when the second initial fast equalizationtimeout duration is not 0, determining that the secondary chip supportsthe fast equalization.
 7. The method according to claim 2, furthercomprising: storing second equalization parameters that satisfy the linkstability requirement and that are obtained when the N^(th) time of linkequalization is performed, wherein the second equalization parameterscomprise the receive parameter and the transmit parameter of the primarychip and the receive parameter and the transmit parameter of thesecondary chip.
 8. The method according to claim 2, wherein after theN^(th) time of link equalization is performed, the method furthercomprises: clearing the first fast equalization timeout duration.
 9. Themethod according to claim 7, further comprising: in response todetermining that an (N+b)^(th) time of link equalization needs to beperformed, configuring second fast equalization timeout duration; andinvoking the second equalization parameters, so that the primary chipand the secondary chip perform the (N+b)^(th) time of link equalizationbased on the second fast equalization timeout duration and the secondequalization parameters, wherein the second fast equalization timeoutduration represents an equalization timeout duration that is of theprimary chip in the third phase of equalization and that exists when the(N+b)^(th) time of link equalization is performed and an equalizationtimeout duration that is of the primary chip in the fourth phase ofequalization and that exists when the (N+b)^(th) time of linkequalization is performed, and wherein the second fast equalizationtimeout duration represents an equalization timeout duration that is ofthe secondary chip in the third phase of equalization and that existswhen the (N+b)^(th) time of link equalization is performed and anequalization timeout duration that is of the secondary chip in thefourth phase of equalization and that exists when the (N+b)^(th) time oflink equalization is performed, the second fast equalization timeoutduration is the same as the first fast equalization timeout duration,b≥1, and b is an integer.
 10. The method according to claim 2, whereinthe primary chip and the secondary chip are connected to each other viaa peripheral component interconnect express (PCIe) bus or a cachecoherent interconnect for accelerators (CCIX) bus.
 11. The methodaccording to claim 2, further comprising in response to determining thatthe N^(th) time of link equalization needs to be performed, performinghot reset and link retrain that are triggered by an operating system.12. The method according to claim 2, wherein the first initial fastequalization timeout duration is determined based on a physical layer(PHY) capability supported by the primary chip, or the second initialfast equalization timeout duration is determined based on a PHYcapability supported by the secondary chip.
 13. A fast equalizationapparatus, comprising: a manager adapted to store first equalizationparameters that satisfy a link stability requirement and that areobtained when an (N−a)^(th) time of link equalization is performed,wherein the first equalization parameters comprise a receive parameterand a transmit parameter of a primary chip and a receive parameter and atransmit parameter of a secondary chip, N≥2, 1≤a≤N, and both a and N areintegers; and a transceiver adapted to: in response to the managerdetermining that an N^(th) time of link equalization needs to beperformed, read a first initial fast equalization timeout duration ofthe primary chip and a second initial fast equalization timeout durationof the secondary chip, wherein the first initial fast equalizationtimeout duration is less than or equal to equalization timeout durationthat is of the primary chip in a fourth phase of equalization and thatexists when the (N−a)^(th) time of link equalization is performed,wherein the second initial fast equalization timeout durations is lessthan or equal to equalization timeout duration that is of the secondarychip in a third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed, and wherein both thefirst and second initial fast equalization timeout durations are deviceadvertised values and are hardware initialized values.
 14. The apparatusaccording to claim 13, wherein the manager is further adapted to:configure a first fast equalization timeout duration based on the firstand second initial fast equalization timeout durations, and invoke thefirst equalization parameters, so that the primary chip and thesecondary chip perform the N^(th) time of link equalization based on thefirst fast equalization timeout duration and the first equalizationparameters, wherein the first fast equalization timeout duration is alarger value of the first and second initial fast equalization timeoutdurations, wherein the first fast equalization timeout durationrepresents an equalization timeout duration that is of the primary chipin the third phase of equalization and that exists when the N^(th) timeof link equalization is performed and an equalization timeout durationthat is of the primary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed, andwherein the first fast equalization timeout duration represents anequalization timeout duration that is of the secondary chip in the thirdphase of equalization and that exists when the N^(th) time of linkequalization is performed and an equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the N^(th) time of link equalization is performed.
 15. Theapparatus according to claim 14, wherein the manager is adapted toinvoke parameters corresponding to a rate that needs to be reached afterthe N^(th) time of link equalization is performed and that are in thefirst equalization parameters, so that the primary chip and thesecondary chip perform the N^(th) time of link equalization based on thefirst fast equalization timeout duration and the parameterscorresponding to the rate.
 16. The apparatus according to claim 14,wherein the manager is further adapted to: determine whether the primarychip supports fast equalization; determine whether the secondary chipsupports the fast equalization; and configure the first fastequalization timeout duration when both the primary chip and thesecondary chip support the fast equalization.
 17. The apparatusaccording to claim 16, wherein the primary chip supports the fastequalization when the first initial fast equalization timeout durationis not
 0. 18. The apparatus according to claim 16, wherein the secondarychip supports the fast equalization when the second initial fastequalization timeout duration of the secondary chip is not
 0. 19. Theapparatus according to claim 14, wherein the manager is further adaptedto store second equalization parameters that satisfy the link stabilityrequirement and that are obtained when the N^(th) time of linkequalization is performed, wherein the second equalization parameterscomprise the receive parameter and the transmit parameter of the primarychip and the receive parameter and the transmit parameter of thesecondary chip.
 20. The apparatus according to claim 14, wherein afterthe N^(th) time of link equalization is performed, the manager isfurther adapted to clear the first fast equalization timeout duration.21. The apparatus according to claim 19, wherein the manager is furtheradapted to: in response to determining that an (N+b)^(th) time of linkequalization needs to be performed, configure second fast equalizationtimeout duration; and invoke the second equalization parameters, so thatthe primary chip and the secondary chip perform the (N+b)^(th) time oflink equalization based on the second fast equalization timeout durationand the second equalization parameters, wherein the second fastequalization timeout duration represents an equalization timeoutduration that is of the primary chip in the third phase of equalizationand that exists when the (N+b)^(th) time of link equalization isperformed and an equalization timeout duration that is of the primarychip in the fourth phase of equalization and that exists when the(N+b)^(th) time of link equalization is performed, and wherein thesecond fast equalization timeout duration represents an equalizationtimeout duration that is of the secondary chip in the third phase ofequalization and that exists when the (N+b)^(th) time of linkequalization is performed and an equalization timeout duration that isof the secondary chip in the fourth phase of equalization and thatexists when the (N+b)^(th) time of link equalization is performed, thesecond fast equalization timeout duration is the same as the first fastequalization timeout duration, b≥1, and b is an integer.
 22. Acommunications system, comprising system software, a primary chip, and asecondary chip connected to each other via a peripheral componentinterconnect express (PCIe) bus or a cache coherent interconnect foraccelerators (CCIX) bus; and wherein the system software, when executed,is adapted to perform a fast equalization method, the method comprising:storing first equalization parameters that satisfy a link stabilityrequirement and are obtained when an (N−a)^(th) time of linkequalization is performed, wherein the first equalization parameterscomprise a receive parameter and a transmit parameter of a primary chipand a receive parameter and a transmit parameter of a secondary chip,N≥2, 1≤a≤N, and both a and N are integers; and in response todetermining that an N^(th) time of link equalization needs to beperformed, reading a first initial fast equalization timeout duration ofthe primary chip and a second initial fast equalization timeout durationof the secondary chip, wherein the first initial fast equalizationtimeout duration is less than or equal to an equalization timeoutduration that is of the primary chip in a fourth phase of equalizationand that exists when the (N−a)^(th) time of link equalization isperformed, wherein the second initial fast equalization timeout durationis less than or equal to an equalization timeout duration that is of thesecondary chip in a third phase of equalization and that exists when the(N−a)^(th) time of link equalization is performed, wherein both thefirst and second initial fast equalization timeout durations are deviceadvertised values and are hardware initialized values.